Error message

You are browsing documentation for drupal 7.x, which is not supported anymore. Read the updated version of this page for drupal 11.x (the latest version).

function menu_get_router

Gets the menu router.

Related topics

Menu system
Define the navigation menus, and route page requests to code based on URLs.
2 calls to menu_get_router()
menu_reset_item in modules/menu/menu.module
Reset a system-defined menu link.
SystemAdminTestCase::testAdminPages in modules/system/system.test
Tests output on administrative listing pages.

File

includes/menu.inc, line 2862

Code

function menu_get_router () {
 // Check first if we have it in memory already.
 $menu = _menu_router_cache ();
 if (empty($menu)) {
 list($menu, $masks) = menu_router_build ();
 }
 return $menu;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.