Table of Contents

Class DictionaryTreeController

Namespace
Umbraco.Cms.Web.BackOffice.Trees
Assembly
Umbraco.Web.BackOffice.dll
[Authorize(Policy = "TreeAccessDictionaryOrTemplates")]
[Tree("translation", "dictionary", TreeGroup = "settingsGroup")]
public class DictionaryTreeController : TreeController, ITree
Inheritance
DictionaryTreeController
Implements
ITree
Inherited Members

Constructors

DictionaryTreeController(ILocalizedTextService, UmbracoApiControllerTypeCollection, IMenuItemCollectionFactory, ILocalizationService, IEventAggregator)

public DictionaryTreeController(ILocalizedTextService localizedTextService, UmbracoApiControllerTypeCollection umbracoApiControllerTypeCollection, IMenuItemCollectionFactory menuItemCollectionFactory, ILocalizationService localizationService, IEventAggregator eventAggregator)

Parameters

localizedTextService ILocalizedTextService
umbracoApiControllerTypeCollection UmbracoApiControllerTypeCollection
menuItemCollectionFactory IMenuItemCollectionFactory
localizationService ILocalizationService
eventAggregator IEventAggregator

Methods

CreateRootNode(FormCollection)

protected override ActionResult<TreeNode?> CreateRootNode(FormCollection queryStrings)

Parameters

queryStrings FormCollection

Returns

ActionResult<TreeNode>

GetMenuForNode(string, FormCollection)

Returns the menu structure for the node

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

Parameters

id string

The id of the tree item

queryStrings FormCollection

All of the query string parameters passed from jsTree

Returns

ActionResult<MenuItemCollection>

GetTreeNodes(string, FormCollection)

The method called to render the contents of the tree structure

protected override ActionResult<TreeNodeCollection> GetTreeNodes(string id, FormCollection queryStrings)

Parameters

id string

The id of the tree item

queryStrings FormCollection

All of the query string parameters passed from jsTree

Returns

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.