function _dhtml_menu_stack in DHTML Menu 6.3
Same name and namespace in other branches
- 8 dhtml_menu.theme.inc \_dhtml_menu_stack()
- 6.4 dhtml_menu.theme.inc \_dhtml_menu_stack()
Helper function for storing recursion levels.
Parameters
$link: If a menu item link is passed, it will be appended to the stack. If none is given, the stack will be returned and popped by one.
Return value
The stack, if no parameter is given.
2 calls to _dhtml_menu_stack()
- dhtml_menu_theme_menu_item in ./
dhtml_menu.module - Preprocessor for menu_item. Checks whether the current item has children that were not rendered, and loads and renders them.
- dhtml_menu_theme_menu_item_link in ./
dhtml_menu.module - Preprocessor for menu_item_link. Adds an ID attribute to menu links and helps the module follow the recursion of menu_tree_output().
File
- ./
dhtml_menu.module, line 143 - dhtml_menu.module Adds preprocessors to the menu theming functions that will add dynamic expansion to their menus.
Code
function _dhtml_menu_stack($link = FALSE) {
static $stack = array();
if ($link) {
array_push($stack, $link);
}
else {
return array_pop($stack);
}
}