View Source
Class TreeControllerBase
A base controller reference for non-attributed trees (un-registered).
Inheritance
System.Object
Assembly: Umbraco.Web.dll
Syntax
public abstract class TreeControllerBase : UmbracoAuthorizedApiController, IDiscoverable
Constructors
View Source
TreeControllerBase()
Declaration
protected TreeControllerBase()
View Source
TreeControllerBase(IGlobalSettings, IUmbracoContextAccessor, ISqlContext, ServiceContext, AppCaches, IProfilingLogger, IRuntimeState, UmbracoHelper)
Declaration
protected TreeControllerBase(IGlobalSettings globalSettings, IUmbracoContextAccessor umbracoContextAccessor, ISqlContext sqlContext, ServiceContext services, AppCaches appCaches, IProfilingLogger logger, IRuntimeState runtimeState, UmbracoHelper umbracoHelper)
Parameters
Properties
View Source
IsSingleNodeTree
Declaration
public abstract bool IsSingleNodeTree { get; }
Property Value
Type |
Description |
System.Boolean |
|
View Source
RootNodeDisplayName
The name to display on the root node
Declaration
public abstract string RootNodeDisplayName { get; }
Property Value
Type |
Description |
System.String |
|
View Source
SectionAlias
Declaration
public abstract string SectionAlias { get; }
Property Value
Type |
Description |
System.String |
|
View Source
SortOrder
Declaration
public abstract int SortOrder { get; }
Property Value
Type |
Description |
System.Int32 |
|
View Source
TreeAlias
Declaration
public abstract string TreeAlias { get; }
Property Value
Type |
Description |
System.String |
|
View Source
TreeGroup
Declaration
public abstract string TreeGroup { get; }
Property Value
Type |
Description |
System.String |
|
View Source
TreeTitle
Declaration
public abstract string TreeTitle { get; }
Property Value
Type |
Description |
System.String |
|
View Source
TreeUse
Declaration
public abstract TreeUse TreeUse { get; }
Property Value
Methods
View Source
The AdditionalData of a node is always populated with the query string data, this method performs this
operation and ensures that special values are not inserted or that duplicate keys are not added.
Declaration
protected void AddQueryStringsToAdditionalData(TreeNode node, FormDataCollection queryStrings)
Parameters
Type |
Name |
Description |
TreeNode |
node |
|
FormDataCollection |
queryStrings |
|
View Source
Helper method to create a root model for a tree
Declaration
protected virtual TreeNode CreateRootNode(FormDataCollection queryStrings)
Parameters
Type |
Name |
Description |
FormDataCollection |
queryStrings |
|
Returns
View Source
Helper method to create tree nodes
Declaration
public TreeNode CreateTreeNode(string id, string parentId, FormDataCollection queryStrings, string title)
Parameters
Type |
Name |
Description |
System.String |
id |
|
System.String |
parentId |
|
FormDataCollection |
queryStrings |
|
System.String |
title |
|
Returns
View Source
Helper method to create tree nodes
Declaration
public TreeNode CreateTreeNode(string id, string parentId, FormDataCollection queryStrings, string title, string icon)
Parameters
Type |
Name |
Description |
System.String |
id |
|
System.String |
parentId |
|
FormDataCollection |
queryStrings |
|
System.String |
title |
|
System.String |
icon |
|
Returns
View Source
Helper method to create tree nodes and automatically generate the json URL
Declaration
public TreeNode CreateTreeNode(string id, string parentId, FormDataCollection queryStrings, string title, string icon, bool hasChildren)
Parameters
Type |
Name |
Description |
System.String |
id |
|
System.String |
parentId |
|
FormDataCollection |
queryStrings |
|
System.String |
title |
|
System.String |
icon |
|
System.Boolean |
hasChildren |
|
Returns
View Source
Helper method to create tree nodes and automatically generate the json URL
Declaration
public TreeNode CreateTreeNode(string id, string parentId, FormDataCollection queryStrings, string title, string icon, bool hasChildren, string routePath)
Parameters
Type |
Name |
Description |
System.String |
id |
|
System.String |
parentId |
|
FormDataCollection |
queryStrings |
|
System.String |
title |
|
System.String |
icon |
|
System.Boolean |
hasChildren |
|
System.String |
routePath |
|
Returns
View Source
Helper method to create tree nodes and automatically generate the json URL + UDI
Declaration
public TreeNode CreateTreeNode(string id, string parentId, FormDataCollection queryStrings, string title, string icon, bool hasChildren, string routePath, Udi udi)
Parameters
Type |
Name |
Description |
System.String |
id |
|
System.String |
parentId |
|
FormDataCollection |
queryStrings |
|
System.String |
title |
|
System.String |
icon |
|
System.Boolean |
hasChildren |
|
System.String |
routePath |
|
Udi |
udi |
|
Returns
View Source
Helper method to create tree nodes
Declaration
public TreeNode CreateTreeNode(string id, string parentId, FormDataCollection queryStrings, string title, string icon, string routePath)
Parameters
Type |
Name |
Description |
System.String |
id |
|
System.String |
parentId |
|
FormDataCollection |
queryStrings |
|
System.String |
title |
|
System.String |
icon |
|
System.String |
routePath |
|
Returns
View Source
Helper method to create tree nodes and automatically generate the json URL + UDI
Declaration
public TreeNode CreateTreeNode(IEntitySlim entity, Guid entityObjectType, string parentId, FormDataCollection queryStrings, bool hasChildren)
Parameters
Type |
Name |
Description |
IEntitySlim |
entity |
|
System.Guid |
entityObjectType |
|
System.String |
parentId |
|
FormDataCollection |
queryStrings |
|
System.Boolean |
hasChildren |
|
Returns
View Source
Helper method to create tree nodes and automatically generate the json URL + UDI
Declaration
public TreeNode CreateTreeNode(IUmbracoEntity entity, Guid entityObjectType, string parentId, FormDataCollection queryStrings, string icon, bool hasChildren)
Parameters
Type |
Name |
Description |
IUmbracoEntity |
entity |
|
System.Guid |
entityObjectType |
|
System.String |
parentId |
|
FormDataCollection |
queryStrings |
|
System.String |
icon |
|
System.Boolean |
hasChildren |
|
Returns
View Source
The action called to render the menu for a tree node
Declaration
public MenuItemCollection GetMenu(string id, FormDataCollection queryStrings)
Parameters
Type |
Name |
Description |
System.String |
id |
|
FormDataCollection |
queryStrings |
|
Returns
View Source
Returns the menu structure for the node
Declaration
protected abstract MenuItemCollection GetMenuForNode(string id, FormDataCollection queryStrings)
Parameters
Type |
Name |
Description |
System.String |
id |
|
FormDataCollection |
queryStrings |
|
Returns
View Source
The action called to render the contents of the tree structure
Declaration
public TreeNodeCollection GetNodes(string id, FormDataCollection queryStrings)
Parameters
Type |
Name |
Description |
System.String |
id |
|
FormDataCollection |
queryStrings |
All of the query string parameters passed from jsTree
|
Returns
View Source
Returns the root node for the tree
Declaration
public TreeNode GetRootNode(FormDataCollection queryStrings)
Parameters
Type |
Name |
Description |
FormDataCollection |
queryStrings |
|
Returns
View Source
The method called to render the contents of the tree structure
Declaration
protected abstract TreeNodeCollection GetTreeNodes(string id, FormDataCollection queryStrings)
Parameters
Type |
Name |
Description |
System.String |
id |
|
FormDataCollection |
queryStrings |
All of the query string parameters passed from jsTree
|
Returns
View Source
If the request is for a dialog mode tree
Declaration
protected bool IsDialog(FormDataCollection queryStrings)
Parameters
Type |
Name |
Description |
FormDataCollection |
queryStrings |
|
Returns
Type |
Description |
System.Boolean |
|
Events
View Source
An event that allows developers to modify the menu that is being rendered
Declaration
public static event TypedEventHandler<TreeControllerBase, MenuRenderingEventArgs> MenuRendering
Event Type
View Source
RootNodeRendering
An event that allows developer to modify the root tree node that is being rendered
Declaration
public static event TypedEventHandler<TreeControllerBase, TreeNodeRenderingEventArgs> RootNodeRendering
Event Type
View Source
TreeNodesRendering
An event that allows developers to modify the tree node collection that is being rendered
Declaration
public static event TypedEventHandler<TreeControllerBase, TreeNodesRenderingEventArgs> TreeNodesRendering
Event Type