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 220)
mixed
&AddOption
(string $label, string $target, [string $title = ""], [string $active = false], [int $sortkey = 1000])
mixed
&AddSubMenu
(object &$submenu_set, string $label, string $target, [string $title = ""], [string $active = false], [int $sortkey = 2000])
Constructor MenuSet (line 268)
Start a new MenuSet with no options.
AddOption (line 286)
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 325)
Add an option, which is a submenu
LinkActiveSubMenus (line 379)
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 397)
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 446)
Render the menu tree to an HTML fragment.
Size (line 356)
Find out how many options the menu has.
_CompareSequence (line 432)
_CompareSequence is used in sorting the menu options into the sequence order
_HasActive (line 338)
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 364)
See if a menu already has this option
Documentation generated on Tue, 18 Nov 2008 18:08:58 +1300 by phpDocumentor 1.3.2