menu-builder
menu-builder copied to clipboard
Enhancement: Document setAttributes
Had to read through code to figure out how to add an attribute to the generated <ul>
element.
To add a class to the containing <ul>
do this:
$menu = new Tlr\Menu\MenuItem;
$menu->setAttributes(['class'=>'nav classes']);
Good point - when writing the readme, i was more focussed on getting a bit in about all the possible things. I might take an opportunity to write a slightly more fully featured one...!