Add a item to the default menu
Menu::add('home', 'Homepage');
Add a item with a subitem to the default menu
Menu::add('home', 'Homepage', Menu::items()->add('home/sub', 'Subitem'));
Add a item with attributes for the item's HTML element
Menu::add('home', 'Homepage', null, array('class' => 'fancy'));
public add ( string $url, string $value, |
||
$url | string | Url of the link |
$value | string | (H)T(ML) inside of the link |
$children | Children | |
$linkAttributes | array | Attributes for the link |
$itemAttributes | array | Attributes for the item |
$itemElement | string | The element for the item |
$beforeContent | string | String to add before the link |
$afterContent | string | String to add after the link |
return |