public static function Drupal::menuTree in Drupal 9
Same name and namespace in other branches
- 8 core/lib/Drupal.php \Drupal::menuTree()
- 10 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 683
Class
- Drupal
- Static Service Container wrapper.
Code
public static function menuTree() {
return static::getContainer()
->get('menu.link_tree');
}