Method | Description | |
---|---|---|
__construct ( DvsMenu $Menu, DvsMenuItem $MenuItem, |
||
buildMenu ( $name, integer $depth = 2, null $page = null ) : mixed | Build a menu from it's name | |
findById ( $id ) : DvsMenu | Finds DvsMenu by an integer id | |
findMenuByName ( string $name ) : array | Find menu using name value | |
getChildrenMenuItems ( $name ) : array | Get the children menu items of a menu name | |
getSiblingMenuItems ( $name ) : array | Get menu siblings | |
menuStructure ( DvsMenu | DvsMenuItem $menu, boolean $isRootMenu = true ) : array | A simple way to view the menu structure not in use by anything right now but here for troubleshooting menus if we need to | |
menus ( ) : |
Returns a Collection of DvsMenus |
Method | Description | |
---|---|---|
checkMenuItemPermission ( $permission ) : boolean | Tells us whether or not the menu item is supposed to be shown to this user | |
childrenLoaded ( MenuItem $item ) : boolean | checks if the children relation has been lazy loaded the goal is to respect the 'depth' value requested when the menu was built | |
getAllowedMenuItems ( DvsMenuItem $menuItem ) : DvsMenuItem | false | This will let us know if the menu item is allowed and it also traverses all it's children (and future generations) filtering out menu items that are not allowed | |
getAllowedMenuItemsFromMenu ( DvsMenu $menu ) : |
This gets us all the allowed menu items from a particular menu. | |
getLazyLoadByDepth ( $startingRelation, $depth ) : string | generates the lazy load string based off the requested depth | |
getTranslation ( $menu ) : mixed | Translate the menu if needed | |
locateCurrentMenuItem ( $pageId, $menuItems ) : boolean | recursively traverses the menu items and their children finds the item that matches the current page, marks it as an 'activeItem' and marks it's parents as 'activeAncestor' | |
traverseMenu ( $menu, $depth, $page ) : mixed | Traverses the menu recursively finding sub menus |
public __construct ( DvsMenu $Menu, DvsMenuItem $MenuItem, |
||
$Menu | DvsMenu | |
$MenuItem | DvsMenuItem | |
$LanguageDetector | ||
$UserHelper | ||
$Framework |
public findById ( $id ) : DvsMenu | ||
$id | ||
return | DvsMenu |
public findMenuByName ( string $name ) : array | ||
$name | string | Human readable name of link |
return | array |
public getChildrenMenuItems ( $name ) : array | ||
$name | ||
return | array |
public getSiblingMenuItems ( $name ) : array | ||
$name | ||
return | array |