function MenuLinkTree::getCurrentRouteMenuTreeParameters
Same name in other branches
- 8.9.x core/lib/Drupal/Core/Menu/MenuLinkTree.php \Drupal\Core\Menu\MenuLinkTree::getCurrentRouteMenuTreeParameters()
- 10 core/lib/Drupal/Core/Menu/MenuLinkTree.php \Drupal\Core\Menu\MenuLinkTree::getCurrentRouteMenuTreeParameters()
- 11.x core/lib/Drupal/Core/Menu/MenuLinkTree.php \Drupal\Core\Menu\MenuLinkTree::getCurrentRouteMenuTreeParameters()
Overrides MenuLinkTreeInterface::getCurrentRouteMenuTreeParameters
File
-
core/
lib/ Drupal/ Core/ Menu/ MenuLinkTree.php, line 78
Class
- MenuLinkTree
- Implements the loading, transforming and rendering of menu link trees.
Namespace
Drupal\Core\MenuCode
public function getCurrentRouteMenuTreeParameters($menu_name) {
$active_trail = $this->menuActiveTrail
->getActiveTrailIds($menu_name);
$parameters = new MenuTreeParameters();
$parameters->setActiveTrail($active_trail)
->addExpandedParents($active_trail)
->addExpandedParents($this->treeStorage
->getExpanded($menu_name, $active_trail));
return $parameters;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.