SilverStripe\Admin\CMSMenu::add_link
Add an arbitrary URL to the CMS menu.
Signature
public function add_link(string
$code,
string
$menuTitle,
string
$url,
[integer
$priority = 1,
[array
$attributes = NULL,
[string
$iconClass = NULL]]] )
Parameters
$code
—
string
- A unique identifier (used to create a CSS ID and its key in {@link $menu_items})
$menuTitle
—
string
- The link's title in the CMS menu
$url
—
string
- The url of the link
$priority
—
integer
- The menu priority (sorting order) of the menu item. Higher priorities will be further
left.
$attributes
—
array
- an array of attributes to include on the link.
$iconClass
—
string
Returns
- boolean
- The result of the operation.