• Core
  • Infrastructure
  • Web
  • Extensions
Search Results for

    Show / Hide Table of Contents
    View Source

    Class TreeControllerBase

    A base controller reference for non-attributed trees (un-registered).

    Inheritance
    System.Object
    Microsoft.AspNetCore.Mvc.ControllerBase
    UmbracoApiControllerBase
    UmbracoApiController
    UmbracoAuthorizedApiController
    Namespace: Umbraco.Cms.Web.BackOffice.Trees
    Assembly: Umbraco.Web.BackOffice.dll
    Syntax
    [AngularJsonOnlyConfiguration]
    public abstract class TreeControllerBase : UmbracoAuthorizedApiController, IUmbracoFeature, IDiscoverable, ITree
    Remarks

    Developers should generally inherit from TreeController.

    Constructors

    View Source

    TreeControllerBase(UmbracoApiControllerTypeCollection, IEventAggregator)

    Declaration
    protected TreeControllerBase(UmbracoApiControllerTypeCollection apiControllers, IEventAggregator eventAggregator)
    Parameters
    Type Name Description
    UmbracoApiControllerTypeCollection apiControllers
    IEventAggregator eventAggregator

    Properties

    View Source

    IsSingleNodeTree

    Flag to define if this tree is a single node tree (will never contain child nodes, full screen app)

    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

    Gets the section alias.

    Declaration
    public abstract string SectionAlias { get; }
    Property Value
    Type Description
    System.String
    View Source

    SortOrder

    Gets or sets the sort order.

    Declaration
    public abstract int SortOrder { get; }
    Property Value
    Type Description
    System.Int32

    The sort order.

    View Source

    TreeAlias

    Gets the tree alias.

    Declaration
    public abstract string TreeAlias { get; }
    Property Value
    Type Description
    System.String
    View Source

    TreeGroup

    Gets the tree group.

    Declaration
    public abstract string TreeGroup { get; }
    Property Value
    Type Description
    System.String
    View Source

    TreeTitle

    Gets or sets the tree title (fallback if the tree alias isn't localized)

    Declaration
    public abstract string TreeTitle { get; }
    Property Value
    Type Description
    System.String
    View Source

    TreeUse

    Gets the tree use.

    Declaration
    public abstract TreeUse TreeUse { get; }
    Property Value
    Type Description
    TreeUse

    Methods

    View Source

    AddQueryStringsToAdditionalData(TreeNode, FormCollection)

    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, FormCollection queryStrings)
    Parameters
    Type Name Description
    TreeNode node
    Microsoft.AspNetCore.Http.FormCollection queryStrings
    View Source

    CreateRootNode(FormCollection)

    Helper method to create a root model for a tree

    Declaration
    protected virtual ActionResult<TreeNode> CreateRootNode(FormCollection queryStrings)
    Parameters
    Type Name Description
    Microsoft.AspNetCore.Http.FormCollection queryStrings
    Returns
    Type Description
    Microsoft.AspNetCore.Mvc.ActionResult<TreeNode>
    View Source

    CreateTreeNode(String, String, FormCollection, String)

    Helper method to create tree nodes

    Declaration
    public TreeNode CreateTreeNode(string id, string parentId, FormCollection queryStrings, string title)
    Parameters
    Type Name Description
    System.String id
    System.String parentId
    Microsoft.AspNetCore.Http.FormCollection queryStrings
    System.String title
    Returns
    Type Description
    TreeNode
    View Source

    CreateTreeNode(String, String, FormCollection, String, String)

    Helper method to create tree nodes

    Declaration
    public TreeNode CreateTreeNode(string id, string parentId, FormCollection queryStrings, string title, string icon)
    Parameters
    Type Name Description
    System.String id
    System.String parentId
    Microsoft.AspNetCore.Http.FormCollection queryStrings
    System.String title
    System.String icon
    Returns
    Type Description
    TreeNode
    View Source

    CreateTreeNode(String, String, FormCollection, String, String, Boolean)

    Helper method to create tree nodes and automatically generate the json URL

    Declaration
    public TreeNode CreateTreeNode(string id, string parentId, FormCollection queryStrings, string title, string icon, bool hasChildren)
    Parameters
    Type Name Description
    System.String id
    System.String parentId
    Microsoft.AspNetCore.Http.FormCollection queryStrings
    System.String title
    System.String icon
    System.Boolean hasChildren
    Returns
    Type Description
    TreeNode
    View Source

    CreateTreeNode(String, String, FormCollection, String, String, Boolean, String)

    Helper method to create tree nodes and automatically generate the json URL

    Declaration
    public TreeNode CreateTreeNode(string id, string parentId, FormCollection queryStrings, string title, string icon, bool hasChildren, string routePath)
    Parameters
    Type Name Description
    System.String id
    System.String parentId
    Microsoft.AspNetCore.Http.FormCollection queryStrings
    System.String title
    System.String icon
    System.Boolean hasChildren
    System.String routePath
    Returns
    Type Description
    TreeNode
    View Source

    CreateTreeNode(String, String, FormCollection, String, String, Boolean, String, Udi)

    Helper method to create tree nodes and automatically generate the json URL + UDI

    Declaration
    public TreeNode CreateTreeNode(string id, string parentId, FormCollection queryStrings, string title, string icon, bool hasChildren, string routePath, Udi udi)
    Parameters
    Type Name Description
    System.String id
    System.String parentId
    Microsoft.AspNetCore.Http.FormCollection queryStrings
    System.String title
    System.String icon
    System.Boolean hasChildren
    System.String routePath
    Udi udi
    Returns
    Type Description
    TreeNode
    View Source

    CreateTreeNode(String, String, FormCollection, String, String, String)

    Helper method to create tree nodes

    Declaration
    public TreeNode CreateTreeNode(string id, string parentId, FormCollection queryStrings, string title, string icon, string routePath)
    Parameters
    Type Name Description
    System.String id
    System.String parentId
    Microsoft.AspNetCore.Http.FormCollection queryStrings
    System.String title
    System.String icon
    System.String routePath
    Returns
    Type Description
    TreeNode
    View Source

    CreateTreeNode(IEntitySlim, Guid, String, FormCollection, Boolean)

    Helper method to create tree nodes and automatically generate the json URL + UDI

    Declaration
    public TreeNode CreateTreeNode(IEntitySlim entity, Guid entityObjectType, string parentId, FormCollection queryStrings, bool hasChildren)
    Parameters
    Type Name Description
    IEntitySlim entity
    Guid entityObjectType
    System.String parentId
    Microsoft.AspNetCore.Http.FormCollection queryStrings
    System.Boolean hasChildren
    Returns
    Type Description
    TreeNode
    View Source

    CreateTreeNode(IUmbracoEntity, Guid, String, FormCollection, String, Boolean)

    Helper method to create tree nodes and automatically generate the json URL + UDI

    Declaration
    public TreeNode CreateTreeNode(IUmbracoEntity entity, Guid entityObjectType, string parentId, FormCollection queryStrings, string icon, bool hasChildren)
    Parameters
    Type Name Description
    IUmbracoEntity entity
    Guid entityObjectType
    System.String parentId
    Microsoft.AspNetCore.Http.FormCollection queryStrings
    System.String icon
    System.Boolean hasChildren
    Returns
    Type Description
    TreeNode
    View Source

    GetMenu(String, FormCollection)

    The action called to render the menu for a tree node

    Declaration
    public async Task<ActionResult<MenuItemCollection>> GetMenu(string id, [ModelBinder(typeof(HttpQueryStringModelBinder))] FormCollection queryStrings)
    Parameters
    Type Name Description
    System.String id
    Microsoft.AspNetCore.Http.FormCollection queryStrings
    Returns
    Type Description
    Task<Microsoft.AspNetCore.Mvc.ActionResult<MenuItemCollection>>
    View Source

    GetMenuForNode(String, FormCollection)

    Returns the menu structure for the node

    Declaration
    protected abstract ActionResult<MenuItemCollection> GetMenuForNode(string id, [ModelBinder(typeof(HttpQueryStringModelBinder))] FormCollection queryStrings)
    Parameters
    Type Name Description
    System.String id
    Microsoft.AspNetCore.Http.FormCollection queryStrings
    Returns
    Type Description
    Microsoft.AspNetCore.Mvc.ActionResult<MenuItemCollection>
    View Source

    GetMenuForNodeAsync(String, FormCollection)

    Returns the menu structure for the node

    Declaration
    protected virtual async Task<ActionResult<MenuItemCollection>> GetMenuForNodeAsync(string id, [ModelBinder(typeof(HttpQueryStringModelBinder))] FormCollection queryStrings)
    Parameters
    Type Name Description
    System.String id
    Microsoft.AspNetCore.Http.FormCollection queryStrings
    Returns
    Type Description
    Task<Microsoft.AspNetCore.Mvc.ActionResult<MenuItemCollection>>
    Remarks

    If overriden, GetMenuForNode will not be called

    View Source

    GetNodes(String, FormCollection)

    The action called to render the contents of the tree structure

    Declaration
    public async Task<ActionResult<TreeNodeCollection>> GetNodes(string id, [ModelBinder(typeof(HttpQueryStringModelBinder))] FormCollection queryStrings)
    Parameters
    Type Name Description
    System.String id
    Microsoft.AspNetCore.Http.FormCollection queryStrings

    All of the query string parameters passed from jsTree

    Returns
    Type Description
    Task<Microsoft.AspNetCore.Mvc.ActionResult<TreeNodeCollection>>

    JSON markup for jsTree

    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.

    View Source

    GetRootNode(FormCollection)

    Returns the root node for the tree

    Declaration
    public async Task<ActionResult<TreeNode>> GetRootNode([ModelBinder(typeof(HttpQueryStringModelBinder))] FormCollection queryStrings)
    Parameters
    Type Name Description
    Microsoft.AspNetCore.Http.FormCollection queryStrings
    Returns
    Type Description
    Task<Microsoft.AspNetCore.Mvc.ActionResult<TreeNode>>
    View Source

    GetTreeNodes(String, FormCollection)

    The method called to render the contents of the tree structure

    Declaration
    protected abstract ActionResult<TreeNodeCollection> GetTreeNodes(string id, [ModelBinder(typeof(HttpQueryStringModelBinder))] FormCollection queryStrings)
    Parameters
    Type Name Description
    System.String id
    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.

    View Source

    GetTreeNodesAsync(String, FormCollection)

    The method called to render the contents of the tree structure

    Declaration
    protected virtual async Task<ActionResult<TreeNodeCollection>> GetTreeNodesAsync(string id, [ModelBinder(typeof(HttpQueryStringModelBinder))] FormCollection queryStrings)
    Parameters
    Type Name Description
    System.String id
    Microsoft.AspNetCore.Http.FormCollection queryStrings

    All of the query string parameters passed from jsTree

    Returns
    Type Description
    Task<Microsoft.AspNetCore.Mvc.ActionResult<TreeNodeCollection>>
    Remarks

    If overriden, GetTreeNodes will not be called 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.

    View Source

    IsDialog(FormCollection)

    If the request is for a dialog mode tree

    Declaration
    protected bool IsDialog(FormCollection queryStrings)
    Parameters
    Type Name Description
    Microsoft.AspNetCore.Http.FormCollection queryStrings
    Returns
    Type Description
    System.Boolean
    • Improve this Doc
    • View Source
    In This Article
    • Constructors
      • TreeControllerBase(UmbracoApiControllerTypeCollection, IEventAggregator)
    • Properties
      • IsSingleNodeTree
      • RootNodeDisplayName
      • SectionAlias
      • SortOrder
      • TreeAlias
      • TreeGroup
      • TreeTitle
      • TreeUse
    • Methods
      • AddQueryStringsToAdditionalData(TreeNode, FormCollection)
      • CreateRootNode(FormCollection)
      • CreateTreeNode(String, String, FormCollection, String)
      • CreateTreeNode(String, String, FormCollection, String, String)
      • CreateTreeNode(String, String, FormCollection, String, String, Boolean)
      • CreateTreeNode(String, String, FormCollection, String, String, Boolean, String)
      • CreateTreeNode(String, String, FormCollection, String, String, Boolean, String, Udi)
      • CreateTreeNode(String, String, FormCollection, String, String, String)
      • CreateTreeNode(IEntitySlim, Guid, String, FormCollection, Boolean)
      • CreateTreeNode(IUmbracoEntity, Guid, String, FormCollection, String, Boolean)
      • GetMenu(String, FormCollection)
      • GetMenuForNode(String, FormCollection)
      • GetMenuForNodeAsync(String, FormCollection)
      • GetNodes(String, FormCollection)
      • GetRootNode(FormCollection)
      • GetTreeNodes(String, FormCollection)
      • GetTreeNodesAsync(String, FormCollection)
      • IsDialog(FormCollection)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX