MenuSetA MenuSet is a hierarchy of MenuOptions, some of which might be MenuSet objects themselves.
The menu options are presented in HTML span tags, and the menus themselves are presented inside HTML div tags. All layout and styling is expected to be provide by CSS.
A non-trivial example would look something like this:
The menu display will generally recognise the current URL and mark as active the menu option that matches it, but in some cases it might be desirable to force one or another option to be marked as active using the appropriate parameter to the AddOption or AddSubMenu call.
Located in /MenuSet.php (line 222)
mixed
&AddOption
(string $label, string $target, [string $title = ""], [string $active = false], [int $sortkey = null], [external $external = false])
mixed
&AddSubMenu
(object &$submenu_set, string $label, string $target, [string $title = ""], [string $active = false], [int $sortkey = 2000])
Constructor MenuSet (line 276)
Start a new MenuSet with no options.
AddOption (line 295)
Add an option, which is a link.
The call will attempt to work out whether the option should be marked as active, and will sometimes get it wrong.
AddSubMenu (line 341)
Add an option, which is a submenu
LinkActiveSubMenus (line 395)
Mark each MenuOption as active that has an active sub-menu entry.
Currently needs to be called manually before rendering but really should probably be called as part of the render now, and then this could be a private routine.
MakeSomethingActive (line 413)
Mark each MenuOption as active that has an active sub-menu entry.
Currently needs to be called manually before rendering but really should probably be called as part of the render now, and then this could be a private routine.
Render (line 462)
Render the menu tree to an HTML fragment.
RenderAsCSS (line 494)
Render the menu tree to an HTML fragment.
Size (line 372)
Find out how many options the menu has.
_CompareSequence (line 448)
_CompareSequence is used in sorting the menu options into the sequence order
_HasActive (line 354)
Does the menu have any options that are active.
Most likely used so that we can then set the parent menu as active.
_OptionExists (line 380)
See if a menu already has this option
Documentation generated on Fri, 13 Jan 2012 23:40:16 +1300 by phpDocumentor 1.4.3