function Drupal::menuTree

Same name and namespace in other branches
  1. 8.9.x core/lib/Drupal.php \Drupal::menuTree()
  2. 10 core/lib/Drupal.php \Drupal::menuTree()
  3. 11.x core/lib/Drupal.php \Drupal::menuTree()

Returns the menu tree.

Return value

\Drupal\Core\Menu\MenuLinkTreeInterface The menu tree.

File

core/lib/Drupal.php, line 692

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.