|
||||
[previous page]  |  [up one level]  |  [next page] | ||||
|
ZenMenuManager
package : ZenEngine/Core
Author : Bruno Desthuilliers Version : 0.0.5 public class ZenMenuManagerThe ZenMenuManager handles access to the menu items :It allows sequential (first, next etc) traversal of menu, access to next and previous links,finding an item by its key, etc. The menu itself (an associative array) is built by a menuMaker. Functionspublic void ZenMenuManagerManager's constructor... dont do much except storing the menu.
Parameters : array $menu : the menu to manage Return : (void) public object ZenMenuItem getFirstItemReturn the first menu item
Return : (object ZenMenuItem) public object ZenMenuItem getNextItemReturn the next menu item
Return : (object ZenMenuItem) public object ZenMenuItem getLastItemReturn the last menu item
Return : (object ZenMenuItem) public object ZenMenuItem getPrevItemReturn previous menu item
Return : (object ZenMenuItem) public mixed findItemFind an item by it's key
I know sequential traversal of the array may not be best use of an associative array, but it seems that we need this to be properly placed for other menu and links methods, and the array should not grow that big anyway. Parameters : string $key : key of the item to retrieve Return : (mixed) a ZenMenuItem or false public mixed getPrevLinkReturns the menu item for the previous page, if it exists
Parameters : string $key : the key of current item Return : (mixed) a ZenMenuItem or false public mixed getNextLinkReturns the menu item for the next page, if exists
Parameters : string $key : the key of current item Return : (mixed) a ZenMenuItem or false public mixed getUpperLinkReturn the menuItem for the first page of the upper level, if exists
Parameters : string $key : the key of current item Return : (mixed) a ZenMenuItem or false variablesprivate array $_menuThe menu itself, an associative array of key : ZenMenuItem pairs |
|||
[previous page]  |  [up one level]  |  [next page] |