Class DictionaryTreeController
Inheritance
System.Object
Microsoft.AspNetCore.Mvc.ControllerBase
Namespace: Umbraco.Cms.Web.BackOffice.Trees
Assembly: Umbraco.Web.BackOffice.dll
Syntax
[Authorize(Policy = "TreeAccessDictionaryOrTemplates")]
public class DictionaryTreeController : TreeController
Constructors
View SourceDictionaryTreeController(ILocalizedTextService, UmbracoApiControllerTypeCollection, IMenuItemCollectionFactory, ILocalizationService, IEventAggregator)
Declaration
public DictionaryTreeController(ILocalizedTextService localizedTextService, UmbracoApiControllerTypeCollection umbracoApiControllerTypeCollection, IMenuItemCollectionFactory menuItemCollectionFactory, ILocalizationService localizationService, IEventAggregator eventAggregator)
Parameters
Type | Name | Description |
---|---|---|
ILocalizedTextService | localizedTextService | |
UmbracoApiControllerTypeCollection | umbracoApiControllerTypeCollection | |
IMenuItemCollectionFactory | menuItemCollectionFactory | |
ILocalizationService | localizationService | |
IEventAggregator | eventAggregator |
Methods
View SourceCreateRootNode(FormCollection)
Declaration
protected override ActionResult<TreeNode?> CreateRootNode(FormCollection queryStrings)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.AspNetCore.Http.FormCollection | queryStrings |
Returns
Type | Description |
---|---|
Microsoft.AspNetCore.Mvc.ActionResult<System.Nullable<TreeNode>> |
GetMenuForNode(String, FormCollection)
Returns the menu structure for the node
Declaration
protected override ActionResult<MenuItemCollection> GetMenuForNode(string id, FormCollection queryStrings)
Parameters
Type | Name | Description |
---|---|---|
System.String | id | The id of the tree item |
Microsoft.AspNetCore.Http.FormCollection | queryStrings | All of the query string parameters passed from jsTree |
Returns
Type | Description |
---|---|
Microsoft.AspNetCore.Mvc.ActionResult<MenuItemCollection> |
GetTreeNodes(String, FormCollection)
The method called to render the contents of the tree structure
Declaration
protected override ActionResult<TreeNodeCollection> GetTreeNodes(string id, FormCollection queryStrings)
Parameters
Type | Name | Description |
---|---|---|
System.String | id | The id of the tree item |
Microsoft.AspNetCore.Http.FormCollection | queryStrings | All of the query string parameters passed from jsTree |
Returns
Type | Description |
---|---|
Microsoft.AspNetCore.Mvc.ActionResult<TreeNodeCollection> |
Remarks
We are allowing an arbitrary number of query strings to be passed in so that developers are able to persist custom data from the front-end to the back end to be used in the query for model data.