View Source
Class ContentTreeControllerBase
Inheritance
System.Object
Assembly: Umbraco.Web.dll
Syntax
public abstract class ContentTreeControllerBase : TreeController, IDiscoverable
Constructors
View Source
ContentTreeControllerBase()
Declaration
protected ContentTreeControllerBase()
View Source
ContentTreeControllerBase(IGlobalSettings, IUmbracoContextAccessor, ISqlContext, ServiceContext, AppCaches, IProfilingLogger, IRuntimeState, UmbracoHelper)
Declaration
protected ContentTreeControllerBase(IGlobalSettings globalSettings, IUmbracoContextAccessor umbracoContextAccessor, ISqlContext sqlContext, ServiceContext services, AppCaches appCaches, IProfilingLogger logger, IRuntimeState runtimeState, UmbracoHelper umbracoHelper)
Parameters
Properties
View Source
RecycleBinId
Declaration
protected abstract int RecycleBinId { get; }
Property Value
Type |
Description |
System.Int32 |
|
View Source
RecycleBinSmells
Returns true if the recycle bin has items in it
Declaration
protected abstract bool RecycleBinSmells { get; }
Property Value
Type |
Description |
System.Boolean |
|
View Source
UmbracoObjectType
Declaration
protected abstract UmbracoObjectTypes UmbracoObjectType { get; }
Property Value
View Source
UserStartNodes
Returns the user's start node for this tree
Declaration
protected abstract int[] UserStartNodes { get; }
Property Value
Type |
Description |
System.Int32[] |
|
Methods
View Source
CreateRootNode(FormDataCollection)
Ensure the noAccess metadata is applied for the root node if in dialog mode and the user doesn't have path access to it
Declaration
protected override TreeNode CreateRootNode(FormDataCollection queryStrings)
Parameters
Type |
Name |
Description |
FormDataCollection |
queryStrings |
|
Returns
View Source
Based on the allowed actions, this will filter the ones that the current user is allowed
Declaration
protected void FilterUserAllowedMenuItems(MenuItemCollection menuWithAllItems, IEnumerable<MenuItem> userAllowedMenuItems)
Parameters
View Source
GetChildEntities(String, FormDataCollection)
Declaration
protected virtual IEnumerable<IEntitySlim> GetChildEntities(string id, FormDataCollection queryStrings)
Parameters
Type |
Name |
Description |
System.String |
id |
|
FormDataCollection |
queryStrings |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<IEntitySlim> |
|
View Source
Checks if the menu requested is for the recycle bin and renders that, otherwise renders the result of PerformGetMenuForNode
Declaration
protected sealed override MenuItemCollection GetMenuForNode(string id, FormDataCollection queryStrings)
Parameters
Type |
Name |
Description |
System.String |
id |
|
FormDataCollection |
queryStrings |
|
Returns
View Source
GetSingleTreeNode(IEntitySlim, String, FormDataCollection)
Declaration
protected abstract TreeNode GetSingleTreeNode(IEntitySlim entity, string parentId, FormDataCollection queryStrings)
Parameters
Type |
Name |
Description |
IEntitySlim |
entity |
|
System.String |
parentId |
|
FormDataCollection |
queryStrings |
|
Returns
View Source
GetTreeNode(String, FormDataCollection)
Gets an individual tree node
Declaration
public TreeNode GetTreeNode(string id, FormDataCollection queryStrings)
Parameters
Type |
Name |
Description |
System.String |
id |
|
FormDataCollection |
queryStrings |
|
Returns
View Source
GetTreeNodes(String, FormDataCollection)
Ensures the recycle bin is appended when required (i.e. user has access to the root and it's not in dialog mode)
Declaration
protected sealed override TreeNodeCollection GetTreeNodes(string id, FormDataCollection queryStrings)
Parameters
Type |
Name |
Description |
System.String |
id |
|
FormDataCollection |
queryStrings |
|
Returns
View Source
HasPathAccess(String, FormDataCollection)
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 abstract bool HasPathAccess(string id, FormDataCollection queryStrings)
Parameters
Type |
Name |
Description |
System.String |
id |
|
FormDataCollection |
queryStrings |
|
Returns
Type |
Description |
System.Boolean |
|
View Source
HasPathAccess(IUmbracoEntity, FormDataCollection)
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 bool HasPathAccess(IUmbracoEntity entity, FormDataCollection queryStrings)
Parameters
Type |
Name |
Description |
IUmbracoEntity |
entity |
|
FormDataCollection |
queryStrings |
|
Returns
Type |
Description |
System.Boolean |
|
View Source
Declaration
protected abstract MenuItemCollection PerformGetMenuForNode(string id, FormDataCollection queryStrings)
Parameters
Type |
Name |
Description |
System.String |
id |
|
FormDataCollection |
queryStrings |
|
Returns
View Source
PerformGetTreeNodes(String, FormDataCollection)
Declaration
protected virtual TreeNodeCollection PerformGetTreeNodes(string id, FormDataCollection queryStrings)
Parameters
Type |
Name |
Description |
System.String |
id |
|
FormDataCollection |
queryStrings |
|
Returns
View Source
ShouldRenderChildrenOfContainer(IEntitySlim)
Check to see if we should return children of a container node
Declaration
protected bool ShouldRenderChildrenOfContainer(IEntitySlim e)
Parameters
Returns
Type |
Description |
System.Boolean |
|