View Source
Class ContentTreeController
Inheritance
System.Object
Microsoft.AspNetCore.Mvc.ControllerBase
Assembly: Umbraco.Web.BackOffice.dll
Syntax
[Authorize(Policy = "SectionAccessForContentTree")]
public class ContentTreeController : ContentTreeControllerBase, ITreeNodeController
Constructors
View Source
Declaration
public ContentTreeController(ILocalizedTextService localizedTextService, UmbracoApiControllerTypeCollection umbracoApiControllerTypeCollection, IMenuItemCollectionFactory menuItemCollectionFactory, IEntityService entityService, IBackOfficeSecurityAccessor backofficeSecurityAccessor, ILogger<ContentTreeController> logger, ActionCollection actionCollection, IUserService userService, IDataTypeService dataTypeService, UmbracoTreeSearcher treeSearcher, ActionCollection actions, IContentService contentService, IPublicAccessService publicAccessService, ILocalizationService localizationService, IEventAggregator eventAggregator, IEmailSender emailSender, AppCaches appCaches)
Parameters
| Type |
Name |
Description |
| ILocalizedTextService |
localizedTextService |
|
| UmbracoApiControllerTypeCollection |
umbracoApiControllerTypeCollection |
|
| IMenuItemCollectionFactory |
menuItemCollectionFactory |
|
| IEntityService |
entityService |
|
| IBackOfficeSecurityAccessor |
backofficeSecurityAccessor |
|
| Microsoft.Extensions.Logging.ILogger<ContentTreeController> |
logger |
|
| ActionCollection |
actionCollection |
|
| IUserService |
userService |
|
| IDataTypeService |
dataTypeService |
|
| UmbracoTreeSearcher |
treeSearcher |
|
| ActionCollection |
actions |
|
| IContentService |
contentService |
|
| IPublicAccessService |
publicAccessService |
|
| ILocalizationService |
localizationService |
|
| IEventAggregator |
eventAggregator |
|
| IEmailSender |
emailSender |
|
| AppCaches |
appCaches |
|
Properties
View Source
RecycleBinId
Declaration
protected override int RecycleBinId { get; }
Property Value
| Type |
Description |
| System.Int32 |
|
View Source
RecycleBinSmells
Declaration
protected override bool RecycleBinSmells { get; }
Property Value
| Type |
Description |
| System.Boolean |
|
View Source
UmbracoObjectType
Declaration
protected override UmbracoObjectTypes UmbracoObjectType { get; }
Property Value
| Type |
Description |
| UmbracoObjectTypes |
|
View Source
UserStartNodes
Declaration
protected override int[] UserStartNodes { get; }
Property Value
| Type |
Description |
| System.Int32[] |
|
Methods
View Source
Returns a collection of all menu items that can be on a content node
Declaration
protected MenuItemCollection GetAllNodeMenuItems(IUmbracoEntity item)
Parameters
| Type |
Name |
Description |
| IUmbracoEntity |
item |
|
Returns
| Type |
Description |
| MenuItemCollection |
|
View Source
GetChildEntities(String, FormCollection)
Declaration
protected override ActionResult<IEnumerable<IEntitySlim>> GetChildEntities(string id, FormCollection queryStrings)
Parameters
| Type |
Name |
Description |
| System.String |
id |
|
| Microsoft.AspNetCore.Http.FormCollection |
queryStrings |
|
Returns
| Type |
Description |
| Microsoft.AspNetCore.Mvc.ActionResult<IEnumerable<IEntitySlim>> |
|
View Source
Returns a collection of all menu items that can be on a deleted (in recycle bin) content node
Declaration
protected MenuItemCollection GetNodeMenuItemsForDeletedContent(IUmbracoEntity item)
Parameters
| Type |
Name |
Description |
| IUmbracoEntity |
item |
|
Returns
| Type |
Description |
| MenuItemCollection |
|
View Source
GetSingleTreeNode(IEntitySlim, String, FormCollection)
Declaration
protected override TreeNode? GetSingleTreeNode(IEntitySlim entity, string parentId, FormCollection queryStrings)
Parameters
| Type |
Name |
Description |
| IEntitySlim |
entity |
|
| System.String |
parentId |
|
| Microsoft.AspNetCore.Http.FormCollection |
queryStrings |
|
Returns
| Type |
Description |
| System.Nullable<TreeNode> |
|
View Source
HasPathAccess(String, FormCollection)
Returns true or false if the current user has access to the node based on the user's allowed start node (path)
access
Declaration
protected override bool HasPathAccess(string id, FormCollection queryStrings)
Parameters
| Type |
Name |
Description |
| System.String |
id |
|
| Microsoft.AspNetCore.Http.FormCollection |
queryStrings |
|
Returns
| Type |
Description |
| System.Boolean |
|
View Source
Declaration
protected override ActionResult<MenuItemCollection> PerformGetMenuForNode(string id, FormCollection queryStrings)
Parameters
| Type |
Name |
Description |
| System.String |
id |
|
| Microsoft.AspNetCore.Http.FormCollection |
queryStrings |
|
Returns
| Type |
Description |
| Microsoft.AspNetCore.Mvc.ActionResult<MenuItemCollection> |
|
View Source
SearchAsync(String, Int32, Int64, String)
Declaration
public async Task<EntitySearchResults> SearchAsync(string query, int pageSize, long pageIndex, string searchFrom = null)
Parameters
| Type |
Name |
Description |
| System.String |
query |
|
| System.Int32 |
pageSize |
|
| System.Int64 |
pageIndex |
|
| System.String |
searchFrom |
|
Returns
| Type |
Description |
| Task<EntitySearchResults> |
|
View Source
SearchAsync(String, Int32, Int64, String, String)
Declaration
public async Task<EntitySearchResults> SearchAsync(string query, int pageSize, long pageIndex, string searchFrom = null, string culture = null)
Parameters
| Type |
Name |
Description |
| System.String |
query |
|
| System.Int32 |
pageSize |
|
| System.Int64 |
pageIndex |
|
| System.String |
searchFrom |
|
| System.String |
culture |
|
Returns
| Type |
Description |
| Task<EntitySearchResults> |
|