function MenuLinkTree::load
Same name in other branches
- 9 core/lib/Drupal/Core/Menu/MenuLinkTree.php \Drupal\Core\Menu\MenuLinkTree::load()
- 10 core/lib/Drupal/Core/Menu/MenuLinkTree.php \Drupal\Core\Menu\MenuLinkTree::load()
- 11.x core/lib/Drupal/Core/Menu/MenuLinkTree.php \Drupal\Core\Menu\MenuLinkTree::load()
Overrides MenuLinkTreeInterface::load
File
-
core/
lib/ Drupal/ Core/ Menu/ MenuLinkTree.php, line 95
Class
- MenuLinkTree
- Implements the loading, transforming and rendering of menu link trees.
Namespace
Drupal\Core\MenuCode
public function load($menu_name, MenuTreeParameters $parameters) {
$data = $this->treeStorage
->loadTreeData($menu_name, $parameters);
// Pre-load all the route objects in the tree for access checks.
if ($data['route_names']) {
$this->routeProvider
->getRoutesByNames($data['route_names']);
}
return $this->createInstances($data['tree']);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.