function menu_load_all

Load all custom menu data.

Return value

Array of custom menu data.

2 calls to menu_load_all()
menu_get_menus in drupal/core/modules/menu/menu.module
Return an associative array of the custom menus names.
menu_load in drupal/core/modules/menu/menu.module
Load the data for a single custom menu.
1 string reference to 'menu_load_all'
menu_reset_static_cache in drupal/core/includes/menu.inc
Resets the menu system static cache.

File

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

Code

function menu_load_all() {
  $custom_menus =& drupal_static(__FUNCTION__);
  if (!isset($custom_menus)) {
    if ($cached = cache('menu')
      ->get('menu_custom')) {
      $custom_menus = $cached->data;
    }
    else {
      $custom_menus = db_query('SELECT * FROM {menu_custom}')
        ->fetchAllAssoc('menu_name', PDO::FETCH_ASSOC);
      cache('menu')
        ->set('menu_custom', $custom_menus);
    }
  }
  return $custom_menus;
}