Class BasePluginSimpleUI<TOptionType>
A base class for a plugin with a single UI/settings page.
Inherited Members
Namespace: MediaBrowser.Controller.Plugins
Assembly: MediaBrowser.Controller.dll
Syntax
public abstract class BasePluginSimpleUI<TOptionType> : BasePlugin, IPlugin, IPluginAssembly, IHasUIPages where TOptionType : EditableOptionsBase, new()Type Parameters
| Name | Description | 
|---|---|
| TOptionType | The type of the options class. | 
Constructors
BasePluginSimpleUI(IApplicationHost)
Declaration
protected BasePluginSimpleUI(IApplicationHost applicationHost)Parameters
| Type | Name | Description | 
|---|---|---|
| IApplicationHost | applicationHost | 
Methods
GetOptions()
Gets the options.
Declaration
protected TOptionType GetOptions()Returns
| Type | Description | 
|---|---|
| TOptionType | The current options of type  | 
GetPluginInfo()
Declaration
public override PluginInfo GetPluginInfo()Returns
| Type | Description | 
|---|---|
| PluginInfo | 
Overrides
OnBeforeShowUI(TOptionType)
Called before the options UI is shown.
Declaration
protected virtual TOptionType OnBeforeShowUI(TOptionType options)Parameters
| Type | Name | Description | 
|---|---|---|
| TOptionType | options | The options. | 
Returns
| Type | Description | 
|---|---|
| TOptionType | The options object to be used for presentation. | 
Remarks
Override this method to adjust the options before presentation. This allows for example to add or update selection source data or other information.
OnCreatePageInfo(PluginPageInfo)
Declaration
protected virtual void OnCreatePageInfo(PluginPageInfo pageInfo)Parameters
| Type | Name | Description | 
|---|---|---|
| PluginPageInfo | pageInfo | 
OnOptionsSaved(TOptionType)
Declaration
protected virtual void OnOptionsSaved(TOptionType options)Parameters
| Type | Name | Description | 
|---|---|---|
| TOptionType | options | 
OnOptionsSaving(TOptionType)
Called when options are about to be saved to disk.
Declaration
protected virtual bool OnOptionsSaving(TOptionType options)Parameters
| Type | Name | Description | 
|---|---|---|
| TOptionType | options | The options to be saved. | 
Returns
| Type | Description | 
|---|---|
| System.Boolean | Return false to cancel saving. | 
SaveOptions(TOptionType)
Saves the options.
Declaration
protected void SaveOptions(TOptionType options)Parameters
| Type | Name | Description | 
|---|---|---|
| TOptionType | options | The options of type  | 
Explicit Interface Implementations
IHasUIPages.UIPageControllers
Declaration
IReadOnlyCollection<IPluginUIPageController> IHasUIPages.UIPageControllers { get; }Returns
| Type | Description | 
|---|---|
| System.Collections.Generic.IReadOnlyCollection<IPluginUIPageController> |