Helper function to get the items of the given menu.

2 calls to _menu_get_options()
menu_parent_options in modules/menu/menu.module
Return a list of menu items that are valid possible parents for the given menu item.
menu_parent_options_js in modules/menu/menu.module
Page callback. Get all the available menus and menu items as a JavaScript array.

File

modules/menu/menu.module, line 403
Allows administrators to customize the site's navigation menus.

Code

function _menu_get_options($menus, $available_menus, $item) {
  global $menu_admin;
  $menu_admin = TRUE;

  // 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_parents_recurse($tree, $menu_name, '--', $options, $item['mlid'], $limit);
    }
  }
  $menu_admin = FALSE;
  return $options;
}