2017 © Pedro Peláez
 

library menu-builder

Menu Building library

image

daemionfox/menu-builder

Menu Building library

  • Thursday, October 2, 2014
  • by daemionfox
  • Repository
  • 1 Watchers
  • 0 Stars
  • 10 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

MenuBuilder

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)

The Versions

02/10 2014

dev-master

9999999-dev

Menu Building library

  Sources   Download

The Development Requires

by Matt Sowers