function menu_get_names in Drupal 7
Same name and namespace in other branches
- 6 includes/menu.inc \menu_get_names()
Build a list of named menus.
Related topics
2 calls to menu_get_names()
- MenuRouterTestCase::testMenuGetNames in modules/
simpletest/ tests/ menu.test - Test menu_get_names().
- menu_update_7003 in modules/
menu/ menu.install - Add missing custom menus to active menus list.
1 string reference to 'menu_get_names'
- MenuRouterTestCase::testMenuGetNames in modules/
simpletest/ tests/ menu.test - Test menu_get_names().
File
- includes/
menu.inc, line 1800 - API for the Drupal menu system.
Code
function menu_get_names() {
$names =& drupal_static(__FUNCTION__);
if (empty($names)) {
$names = db_select('menu_links')
->distinct()
->fields('menu_links', array(
'menu_name',
))
->orderBy('menu_name')
->execute()
->fetchCol();
}
return $names;
}