function Drupal::menuTree
Same name in other branches
- 9 core/lib/Drupal.php \Drupal::menuTree()
- 10 core/lib/Drupal.php \Drupal::menuTree()
- 11.x core/lib/Drupal.php \Drupal::menuTree()
Returns the menu tree.
Return value
\Drupal\Core\Menu\MenuLinkTreeInterface The menu tree.
4 calls to Drupal::menuTree()
- AdminTest::getTopLevelMenuLinks in core/
modules/ system/ tests/ src/ Functional/ System/ AdminTest.php - Returns all top level menu links.
- DrupalTest::testMenuTree in core/
tests/ Drupal/ Tests/ Core/ DrupalTest.php - Tests the menuTree() method.
- MenuLinkContentCacheabilityBubblingTest::testOutboundPathAndRouteProcessing in core/
modules/ menu_link_content/ tests/ src/ Kernel/ MenuLinkContentCacheabilityBubblingTest.php - Tests bubbleable metadata of menu links' outbound route/path processing.
- system_get_module_admin_tasks in core/
modules/ system/ system.module - Generate a list of tasks offered by a specified module.
File
-
core/
lib/ Drupal.php, line 726
Class
- Drupal
- Static Service Container wrapper.
Code
public static function menuTree() {
return static::getContainer()->get('menu.link_tree');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.