dev-master
9999999-devMenu Building library
The Development Requires
by Matt Sowers
Wallogit.com
2017 © Pedro Peláez
Menu Building library
General menu building class for PHP, takes in an array, returns a number of useful formats., (*1)
The array structure for a single menu item looks like this:, (*2)
array( 'menuItem' => array( 'id' => string, 'class' => array|string|null, 'filters' => array|string|null, 'contents' => array( 'text' => string|null, 'url' => string|null 'target' => string|null 'onclick' => string|null 'style' => string|null ), 'children' => array(menuItems)|null ), ), (*3)
You can submenu as much as you'd like, just by inserting menu-blocks into the 'children' value of its parent, (*4)
Description of each key:, (*5)
id : unique id for this menu item. Optional, if it isn't provided, the system will id each item with a menu_#, (*6)
class : array of classes (or single class) to apply to the menu item. Optional, (*7)
filters : Optional restrictions for this menu item. Building a menu takes on a array|string param containing filters, (*8)
contents : Menu item contents, (*9)
text : Text in display url : optional url target : optional url target onclick : optional onclick call style : optional inline style adjustments
children : Optional location to place submenu items. All submenus must follow the same structure as the parent., (*10)
Menu Building library