function menu_list_system_menus in Drupal 9
Same name and namespace in other branches
- 8 core/includes/menu.inc \menu_list_system_menus()
- 6 includes/menu.inc \menu_list_system_menus()
- 7 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 - API for the Drupal menu system.
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',
];
}