Class CmsSubmenu
- All Implemented Interfaces:
I_CmsContextMenuAction
,I_CmsContextMenuItem
,I_CmsHasMenuItemVisibility
-
Field Summary
-
Constructor Summary
ConstructorDescriptionCmsSubmenu
(String id, String parentId, String title, float order, int priority) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionvoid
executeAction
(I_CmsDialogContext context) Executes the context menu action given a dialog context.getId()
Gets the id.float
getOrder()
Integer attribute which is used to order menu items.Gets the id of the parent entry.int
Gets the priority.Gets the title.getVisibility
(CmsObject cms, List<CmsResource> resources) Computes the visibility for this context menu items with the given CMS context and resources.getVisibility
(I_CmsDialogContext context) Gets the visibility for the current dialog context.boolean
Returns true if this is a leaf item, i.e.
-
Field Details
-
m_id
The item id. -
m_parentId
The parent item id. -
m_order
The order. -
m_priority
The priority.
-
-
Constructor Details
-
CmsSubmenu
Creates a new instance.- Parameters:
id
- the idparentId
- the parent idtitle
- the titleorder
- the orderpriority
- the priority
-
-
Method Details
-
executeAction
Description copied from interface:I_CmsContextMenuItem
Executes the context menu action given a dialog context.- Specified by:
executeAction
in interfaceI_CmsContextMenuAction
- Specified by:
executeAction
in interfaceI_CmsContextMenuItem
- Parameters:
context
- the dialog context- See Also:
-
getId
Description copied from interface:I_CmsContextMenuItem
Gets the id.The id does not need to be unique among all context menu items which are in use in the system, but when multiple menu items with the same id are available for a given context menu, only one of them will be picked, based on the priority (a higher priority context menu item will be preferred to one with a lower priority.
- Specified by:
getId
in interfaceI_CmsContextMenuItem
- Returns:
- the id
- See Also:
-
getOrder
Description copied from interface:I_CmsContextMenuItem
Integer attribute which is used to order menu items.Items with a higher 'order' value will appear after items with a lower order at the same tree level.
- Specified by:
getOrder
in interfaceI_CmsContextMenuItem
- Returns:
- the order
- See Also:
-
getParentId
Description copied from interface:I_CmsContextMenuItem
Gets the id of the parent entry.If this returns null, the context menu item will be inserted at the root level of the context menu, otherwise, it will be added I_CmsContextMenuActionas a sub-entry of the context menu entry with the given id (if such an entry exists; otherwise, the child entry will be ignored).
- Specified by:
getParentId
in interfaceI_CmsContextMenuItem
- Returns:
- the parent id
- See Also:
-
getPriority
Description copied from interface:I_CmsContextMenuItem
Gets the priority.If multiple context menu items with the same id are available for a menu, the one with the highest priority will be picked.
- Specified by:
getPriority
in interfaceI_CmsContextMenuItem
- Returns:
- the priority
- See Also:
-
getTitle
Description copied from interface:I_CmsContextMenuItem
Gets the title.- Specified by:
getTitle
in interfaceI_CmsContextMenuItem
- Parameters:
locale
- the locale- Returns:
- the title
- See Also:
-
getVisibility
Description copied from interface:I_CmsContextMenuItem
Computes the visibility for this context menu items with the given CMS context and resources.- Specified by:
getVisibility
in interfaceI_CmsContextMenuItem
- Specified by:
getVisibility
in interfaceI_CmsHasMenuItemVisibility
- Parameters:
cms
- the current CMS contextresources
- the resources for which the context menu is being opened- Returns:
- the visibility of the context menu item
- See Also:
-
getVisibility
Description copied from interface:I_CmsHasMenuItemVisibility
Gets the visibility for the current dialog context.- Specified by:
getVisibility
in interfaceI_CmsHasMenuItemVisibility
- Parameters:
context
- the dialog context- Returns:
- the visibility
- See Also:
-
isLeafItem
Description copied from interface:I_CmsContextMenuItem
Returns true if this is a leaf item, i.e. an item which has no child items.- Specified by:
isLeafItem
in interfaceI_CmsContextMenuItem
- Returns:
- true if this is a leaf item
- See Also:
-