SilverStripe\Admin\CMSMenu::add_menu_item
Add a navigation item to the main administration menu showing in the top bar.
uses
Signature
public function add_menu_item(string
$code,
string
$menuTitle,
string
$url,
[string
$controllerClass = NULL,
[integer
$priority = 1,
[array
$attributes = NULL,
[string
$iconClass = NULL]]]] )
Parameters
$code
— string- Unique identifier for this menu item (e.g. used by {@link replace_menu_item()} and
{@link remove_menu_item}. Also used as a CSS-class for icon customization. $menuTitle
— string- Localized title showing in the menu bar
$url
— string- A relative URL that will be linked in the menu bar.
$controllerClass
— string- The controller class for this menu, used to check permisssions.
If blank, it's assumed that this is public, and always shown to users who
have the rights to access some other part of the admin area. $priority
— integer$attributes
— array- an array of attributes to include on the link.
$iconClass
— string
Returns
- bool
- Success