View Source
Class ContentControllerBase
An abstract base controller used for media/content/members to try to reduce code replication.
Inheritance
System.Object
Assembly: Umbraco.Web.dll
Syntax
public abstract class ContentControllerBase : BackOfficeNotificationsController, IDiscoverable
Constructors
View Source
ContentControllerBase(IGlobalSettings, IUmbracoContextAccessor, ISqlContext, ServiceContext, AppCaches, IProfilingLogger, IRuntimeState, UmbracoHelper)
Declaration
protected ContentControllerBase(IGlobalSettings globalSettings, IUmbracoContextAccessor umbracoContextAccessor, ISqlContext sqlContext, ServiceContext services, AppCaches appCaches, IProfilingLogger logger, IRuntimeState runtimeState, UmbracoHelper umbracoHelper)
Parameters
Methods
View Source
AddCancelMessage(INotificationModel, String, String, Boolean, Boolean, String[], String[])
Declaration
protected void AddCancelMessage(INotificationModel display, string header = "speechBubbles/operationCancelledHeader", string message = "speechBubbles/operationCancelledText", bool localizeHeader = true, bool localizeMessage = true, string[] headerParams = null, string[] messageParams = null)
Parameters
Type |
Name |
Description |
INotificationModel |
display |
|
System.String |
header |
|
System.String |
message |
|
System.Boolean |
localizeHeader |
|
System.Boolean |
localizeMessage |
|
System.String[] |
headerParams |
|
System.String[] |
messageParams |
|
View Source
GetObjectFromRequest<TPersisted>(Func<TPersisted>)
A helper method to attempt to get the instance from the request storage if it can be found there,
otherwise gets it from the callback specified
Declaration
protected TPersisted GetObjectFromRequest<TPersisted>(Func<TPersisted> getFromService)
Parameters
Type |
Name |
Description |
System.Func<TPersisted> |
getFromService |
|
Returns
Type |
Description |
TPersisted |
|
Type Parameters
Name |
Description |
TPersisted |
|
View Source
HandleContentNotFound(Object, Boolean)
Declaration
protected HttpResponseMessage HandleContentNotFound(object id, bool throwException = true)
Parameters
Type |
Name |
Description |
System.Object |
id |
|
System.Boolean |
throwException |
|
Returns
Type |
Description |
HttpResponseMessage |
|
View Source
HandleInvalidModelState(IErrorModel)
Declaration
protected virtual void HandleInvalidModelState(IErrorModel display)
Parameters