Table of Contents

Class ContentTreeController

Namespace
Umbraco.Cms.Web.BackOffice.Trees
Assembly
Umbraco.Web.BackOffice.dll
[Authorize(Policy = "SectionAccessForContentTree")]
[Tree("content", "content")]
public class ContentTreeController : ContentTreeControllerBase, ITree, ITreeNodeController, ISearchableTreeWithCulture, ISearchableTree, IDiscoverable
Inheritance
ContentTreeController
Implements
ITree
ISearchableTreeWithCulture
ISearchableTree
IDiscoverable
Inherited Members

Constructors

ContentTreeController(ILocalizedTextService, UmbracoApiControllerTypeCollection, IMenuItemCollectionFactory, IEntityService, IBackOfficeSecurityAccessor, ILogger<ContentTreeController>, ActionCollection, IUserService, IDataTypeService, UmbracoTreeSearcher, ActionCollection, IContentService, IPublicAccessService, ILocalizationService, IEventAggregator, IEmailSender, AppCaches)

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

localizedTextService ILocalizedTextService
umbracoApiControllerTypeCollection UmbracoApiControllerTypeCollection
menuItemCollectionFactory IMenuItemCollectionFactory
entityService IEntityService
backofficeSecurityAccessor IBackOfficeSecurityAccessor
logger ILogger<ContentTreeController>
actionCollection ActionCollection
userService IUserService
dataTypeService IDataTypeService
treeSearcher UmbracoTreeSearcher
actions ActionCollection
contentService IContentService
publicAccessService IPublicAccessService
localizationService ILocalizationService
eventAggregator IEventAggregator
emailSender IEmailSender
appCaches AppCaches

Properties

RecycleBinId

Returns the

protected override int RecycleBinId { get; }

Property Value

int

RecycleBinSmells

Returns true if the recycle bin has items in it

protected override bool RecycleBinSmells { get; }

Property Value

bool

UmbracoObjectType

protected override UmbracoObjectTypes UmbracoObjectType { get; }

Property Value

UmbracoObjectTypes

UserStartNodes

Returns the user's start node for this tree

protected override int[] UserStartNodes { get; }

Property Value

int[]

Methods

GetAllNodeMenuItems(IUmbracoEntity)

Returns a collection of all menu items that can be on a content node

protected MenuItemCollection GetAllNodeMenuItems(IUmbracoEntity item)

Parameters

item IUmbracoEntity

Returns

MenuItemCollection

GetChildEntities(string, FormCollection)

protected override ActionResult<IEnumerable<IEntitySlim>> GetChildEntities(string id, FormCollection queryStrings)

Parameters

id string
queryStrings FormCollection

Returns

ActionResult<IEnumerable<IEntitySlim>>

GetNodeMenuItemsForDeletedContent(IUmbracoEntity)

Returns a collection of all menu items that can be on a deleted (in recycle bin) content node

protected MenuItemCollection GetNodeMenuItemsForDeletedContent(IUmbracoEntity item)

Parameters

item IUmbracoEntity

Returns

MenuItemCollection

GetSingleTreeNode(IEntitySlim, string, FormCollection?)

protected override TreeNode? GetSingleTreeNode(IEntitySlim entity, string parentId, FormCollection? queryStrings)

Parameters

entity IEntitySlim
parentId string
queryStrings FormCollection

Returns

TreeNode

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

protected override bool HasPathAccess(string id, FormCollection queryStrings)

Parameters

id string
queryStrings FormCollection

Returns

bool

PerformGetMenuForNode(string, FormCollection)

protected override ActionResult<MenuItemCollection> PerformGetMenuForNode(string id, FormCollection queryStrings)

Parameters

id string
queryStrings FormCollection

Returns

ActionResult<MenuItemCollection>

SearchAsync(string, int, long, string?)

public Task<EntitySearchResults> SearchAsync(string query, int pageSize, long pageIndex, string? searchFrom = null)

Parameters

query string
pageSize int
pageIndex long
searchFrom string

Returns

Task<EntitySearchResults>

SearchAsync(string, int, long, string?, string?)

public Task<EntitySearchResults> SearchAsync(string query, int pageSize, long pageIndex, string? searchFrom = null, string? culture = null)

Parameters

query string
pageSize int
pageIndex long
searchFrom string
culture string

Returns

Task<EntitySearchResults>