\CMSMenu
The object manages the main CMS menu. See {@link LeftAndMain::init()} for example usage.
The menu will be automatically populated with menu items for subclasses of .
That is, for each class in the CMS that creates an administration panel, a CMS menu item will be created.
The default configuration will also include a 'help' link to the SilverStripe user documentation.
Synopsis
class CMSMenu
extends Object
implements
IteratorAggregate,i18nEntityProvider
{
- // members
- protected static array $menu_item_changes = ;
- protected static boolean $menu_is_cleared = false;
- // methods
- public static void populate_menu()
- public static void add_director_rules()
- public static The add_controller()
- protected static void menuitem_for_controller()
- protected static void add_director_rule_for_controller()
- public static boolean add_link()
- public static boolean add_menu_item()
- public static array get_menu_item()
- public static array get_menu_items()
- public static array get_viewable_menu_items()
- public static void remove_menu_item()
- public static void clear_menu()
- public static boolean replace_menu_item()
- protected static void add_menu_item_obj()
- public static array get_cms_classes()
- public void getIterator()
- public void provideI18nEntities()
Hierarchy
Tasks
Line | Task |
---|---|
52+ | A director rule is added when a controller link is added, but it won't be removed when the item is removed. Functionality needed in {@link Director}. |
275+ | A variation of this function could probably be moved to {@link ClassInfo} |
Members
protected
Methods
protected
- add_director_rule_for_controller() — Add the appropriate Director rules for the given controller.
public
- add_controller() — Add a LeftAndMain controller to the CMS menu.
- add_director_rules() — Add Director rules for all of the CMS controllers.
- add_link() — Add an arbitrary URL to the CMS menu.
- getIterator() — IteratorAggregate Interface Method. Iterates over the menu items.
- get_cms_classes() — A utility funciton to retrieve subclasses of a given class that are instantiable (ie, not abstract) and have a valid menu title.
- provideI18nEntities() — Provide menu titles to the i18n entity provider