Search Results for

    Show / Hide Table of Contents
    View Source

    Class MenuItemList

    A custom menu list

    Inheritance
    System.Object
    Namespace: Umbraco.Cms.Core.Trees
    Assembly: Umbraco.Core.dll
    Syntax
    public class MenuItemList : List<MenuItem>
    Remarks

    NOTE: We need a sub collection to the MenuItemCollection object due to how json serialization works.

    Constructors

    View Source

    MenuItemList(ActionCollection)

    Declaration
    public MenuItemList(ActionCollection actionCollection)
    Parameters
    Type Name Description
    ActionCollection actionCollection
    View Source

    MenuItemList(ActionCollection, IEnumerable<MenuItem>)

    Declaration
    public MenuItemList(ActionCollection actionCollection, IEnumerable<MenuItem> items)
    Parameters
    Type Name Description
    ActionCollection actionCollection
    IEnumerable<MenuItem> items

    Methods

    View Source

    Add<T>(ILocalizedTextService, Boolean, Boolean)

    Adds a menu item with a dictionary which is merged to the AdditionalData bag

    Declaration
    public MenuItem Add<T>(ILocalizedTextService textService, bool hasSeparator = false, bool opensDialog = false)
        where T : IAction
    Parameters
    Type Name Description
    ILocalizedTextService textService

    The ILocalizedTextService used to localize the action name based on its alias

    System.Boolean hasSeparator
    System.Boolean opensDialog

    Whether or not this action opens a dialog

    Returns
    Type Description
    MenuItem
    Type Parameters
    Name Description
    T
    View Source

    Add<T>(ILocalizedTextService, Boolean, Boolean, Boolean)

    Adds a menu item with a dictionary which is merged to the AdditionalData bag

    Declaration
    public MenuItem Add<T>(ILocalizedTextService textService, bool hasSeparator = false, bool opensDialog = false, bool useLegacyIcon = true)
        where T : IAction
    Parameters
    Type Name Description
    ILocalizedTextService textService

    The ILocalizedTextService used to localize the action name based on its alias

    System.Boolean hasSeparator
    System.Boolean opensDialog

    Whether or not this action opens a dialog

    System.Boolean useLegacyIcon

    Whether or not this action should use legacy icon prefixed with "icon-" or full icon name is specified.

    Returns
    Type Description
    MenuItem
    Type Parameters
    Name Description
    T
    • Improve this Doc
    • View Source
    In This Article
    • Constructors
      • MenuItemList(ActionCollection)
      • MenuItemList(ActionCollection, IEnumerable<MenuItem>)
    • Methods
      • Add<T>(ILocalizedTextService, Boolean, Boolean)
      • Add<T>(ILocalizedTextService, Boolean, Boolean, Boolean)
    Back to top Copyright © 2016-present Umbraco
    Generated by DocFX