function menu_list_system_menus
Same name in other branches
- 7.x includes/menu.inc \menu_list_system_menus()
- 8.9.x core/includes/menu.inc \menu_list_system_menus()
Returns an array containing the names of system-defined (default) menus.
Deprecated
in drupal:9.3.0 and is removed from drupal:10.0.0. Use \Drupal\system\Entity\Menu::loadMultiple() instead.
See also
https://www.drupal.org/node/3027453
Related topics
2 calls to menu_list_system_menus()
- MenuLegacyTest::testListSystemMenus in core/
tests/ Drupal/ KernelTests/ Core/ Menu/ MenuLegacyTest.php - Tests deprecation of the menu_list_system_menus() function.
- menu_ui_get_menus in core/
modules/ menu_ui/ menu_ui.module - Return an associative array of the custom menus names.
File
-
core/
includes/ menu.inc, line 21
Code
function menu_list_system_menus() {
@trigger_error(__FUNCTION__ . '() is deprecated in drupal:9.3.0 and is removed from drupal:10.0.0. Use \\Drupal\\system\\Entity\\Menu::loadMultiple() instead. See https://www.drupal.org/node/3027453', E_USER_DEPRECATED);
return [
'tools' => 'Tools',
'admin' => 'Administration',
'account' => 'User account menu',
'main' => 'Main navigation',
'footer' => 'Footer menu',
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.