function _menu_views_get_options in Menu Views 7.2
Same name and namespace in other branches
- 8.3 menu_views.admin.inc \_menu_views_get_options()
Helper function to get the items of the given menu.
1 call to _menu_views_get_options()
- _menu_views_parent_options in ./
menu_views.admin.inc - Return a list of menu items that are valid possible parents for the given menu item.
File
- ./
menu_views.admin.inc, line 694 - Form hooks for the menu_views module.
Code
function _menu_views_get_options($menus, $available_menus, $item) {
// If the item has children, there is an added limit to the depth of valid parents.
if (isset($item['parent_depth_limit'])) {
$limit = $item['parent_depth_limit'];
}
else {
$limit = _menu_parent_depth_limit($item);
}
$options = array();
foreach ($menus as $menu_name => $title) {
if (isset($available_menus[$menu_name])) {
$tree = menu_tree_all_data($menu_name, NULL);
$options[$menu_name . ':0'] = '<' . $title . '>';
_menu_views_parents_recurse($tree, $menu_name, '--', $options, $item['mlid'], $limit);
}
}
return $options;
}