View Source
Class SurfaceController
Provides a base class for front-end add-in controllers.
Inheritance
System.Object
Assembly: Umbraco.Web.Website.dll
Syntax
public abstract class SurfaceController : PluginController
Constructors
View Source
SurfaceController(IUmbracoContextAccessor, IUmbracoDatabaseFactory, ServiceContext, AppCaches, IProfilingLogger, IPublishedUrlProvider)
Declaration
protected SurfaceController(IUmbracoContextAccessor umbracoContextAccessor, IUmbracoDatabaseFactory databaseFactory, ServiceContext services, AppCaches appCaches, IProfilingLogger profilingLogger, IPublishedUrlProvider publishedUrlProvider)
Parameters
Type |
Name |
Description |
IUmbracoContextAccessor |
umbracoContextAccessor |
|
IUmbracoDatabaseFactory |
databaseFactory |
|
ServiceContext |
services |
|
AppCaches |
appCaches |
|
IProfilingLogger |
profilingLogger |
|
IPublishedUrlProvider |
publishedUrlProvider |
|
Properties
View Source
CurrentPage
Declaration
protected virtual IPublishedContent? CurrentPage { get; }
Property Value
Type |
Description |
System.Nullable<IPublishedContent> |
|
View Source
PublishedUrlProvider
Declaration
protected IPublishedUrlProvider PublishedUrlProvider { get; }
Property Value
Type |
Description |
IPublishedUrlProvider |
|
Methods
View Source
CurrentUmbracoPage()
Returns the currently rendered Umbraco page
Declaration
protected UmbracoPageResult CurrentUmbracoPage()
Returns
View Source
RedirectToCurrentUmbracoPage()
Redirects to the currently rendered Umbraco page
Declaration
protected RedirectToUmbracoPageResult RedirectToCurrentUmbracoPage()
Returns
View Source
RedirectToCurrentUmbracoPage(QueryString)
Redirects to the currently rendered Umbraco page and passes provided querystring
Declaration
protected RedirectToUmbracoPageResult RedirectToCurrentUmbracoPage(QueryString queryString)
Parameters
Type |
Name |
Description |
QueryString |
queryString |
|
Returns
View Source
RedirectToCurrentUmbracoUrl()
Redirects to the currently rendered Umbraco URL
Declaration
protected RedirectToUmbracoUrlResult RedirectToCurrentUmbracoUrl()
Returns
View Source
RedirectToUmbracoPage(Guid)
Redirects to the Umbraco page with the given id
Declaration
protected RedirectToUmbracoPageResult RedirectToUmbracoPage(Guid contentKey)
Parameters
Type |
Name |
Description |
Guid |
contentKey |
|
Returns
View Source
RedirectToUmbracoPage(Guid, QueryString)
Redirects to the Umbraco page with the given id and passes provided querystring
Declaration
protected RedirectToUmbracoPageResult RedirectToUmbracoPage(Guid contentKey, QueryString queryString)
Parameters
Type |
Name |
Description |
Guid |
contentKey |
|
QueryString |
queryString |
|
Returns
View Source
RedirectToUmbracoPage(IPublishedContent)
Redirects to the Umbraco page with the given published content
Declaration
protected RedirectToUmbracoPageResult RedirectToUmbracoPage(IPublishedContent publishedContent)
Parameters
Type |
Name |
Description |
IPublishedContent |
publishedContent |
|
Returns
View Source
RedirectToUmbracoPage(IPublishedContent, QueryString)
Redirects to the Umbraco page with the given published content and passes provided querystring
Declaration
protected RedirectToUmbracoPageResult RedirectToUmbracoPage(IPublishedContent publishedContent, QueryString queryString)
Parameters
Type |
Name |
Description |
IPublishedContent |
publishedContent |
|
QueryString |
queryString |
|
Returns