function _i18n_menu_get_options in Internationalization 7
Helper function to get the items of the given menu.
1 call to _i18n_menu_get_options()
- i18n_menu_parent_options in i18n_menu/
i18n_menu.admin.inc - Return a list of menu items that are valid possible parents for the given menu item.
File
- i18n_menu/
i18n_menu.admin.inc, line 160 - Helper functions for menu administration.
Code
function _i18n_menu_get_options($menus, $available_menus, $item, $langcode) {
// 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])) {
if ($tree = i18n_menu_tree_all_data($menu_name, $langcode, NULL)) {
$options[$menu_name . ':0'] = '<' . $title . '>';
_menu_parents_recurse($tree, $menu_name, '--', $options, $item['mlid'], $limit);
}
}
}
return $options;
}