Class PluginController
Provides a base class for plugin controllers.
Inheritance
System.Object
Microsoft.AspNetCore.Mvc.ControllerBase
Microsoft.AspNetCore.Mvc.Controller
Namespace: Umbraco.Cms.Web.Common.Controllers
Assembly: Umbraco.Web.Common.dll
Syntax
public abstract class PluginController : Controller, IActionFilter, IAsyncActionFilter, IFilterMetadata, IDisposable, IDiscoverable
Constructors
View SourcePluginController(IUmbracoContextAccessor, IUmbracoDatabaseFactory, ServiceContext, AppCaches, IProfilingLogger)
Declaration
protected PluginController(IUmbracoContextAccessor umbracoContextAccessor, IUmbracoDatabaseFactory databaseFactory, ServiceContext services, AppCaches appCaches, IProfilingLogger profilingLogger)
Parameters
Type | Name | Description |
---|---|---|
IUmbracoContextAccessor | umbracoContextAccessor | |
IUmbracoDatabaseFactory | databaseFactory | |
ServiceContext | services | |
AppCaches | appCaches | |
IProfilingLogger | profilingLogger |
Properties
View SourceAppCaches
Gets or sets the application cache.
Declaration
public AppCaches AppCaches { get; }
Property Value
Type | Description |
---|---|
AppCaches |
DatabaseFactory
Gets the database context.
Declaration
public IUmbracoDatabaseFactory DatabaseFactory { get; }
Property Value
Type | Description |
---|---|
IUmbracoDatabaseFactory |
ProfilingLogger
Gets or sets the profiling logger.
Declaration
public IProfilingLogger ProfilingLogger { get; }
Property Value
Type | Description |
---|---|
IProfilingLogger |
Services
Gets or sets the services context.
Declaration
public ServiceContext Services { get; }
Property Value
Type | Description |
---|---|
ServiceContext |
UmbracoContext
Gets the Umbraco context.
Declaration
public virtual IUmbracoContext UmbracoContext { get; }
Property Value
Type | Description |
---|---|
IUmbracoContext |
UmbracoContextAccessor
Gets the database context accessor.
Declaration
public virtual IUmbracoContextAccessor UmbracoContextAccessor { get; }
Property Value
Type | Description |
---|---|
IUmbracoContextAccessor |
Methods
View SourceGetMetadata(Type)
Gets metadata for a controller type.
Declaration
public static PluginControllerMetadata GetMetadata(Type controllerType)
Parameters
Type | Name | Description |
---|---|---|
Type | controllerType | The controller type. |
Returns
Type | Description |
---|---|
PluginControllerMetadata | Metadata for the controller type. |