function MenuLinkTreeInterface::getCurrentRouteMenuTreeParameters
Same name in other branches
- 9 core/lib/Drupal/Core/Menu/MenuLinkTreeInterface.php \Drupal\Core\Menu\MenuLinkTreeInterface::getCurrentRouteMenuTreeParameters()
- 8.9.x core/lib/Drupal/Core/Menu/MenuLinkTreeInterface.php \Drupal\Core\Menu\MenuLinkTreeInterface::getCurrentRouteMenuTreeParameters()
- 10 core/lib/Drupal/Core/Menu/MenuLinkTreeInterface.php \Drupal\Core\Menu\MenuLinkTreeInterface::getCurrentRouteMenuTreeParameters()
Gets the link tree parameters for rendering a specific menu.
Builds menu link tree parameters that:
- Expand all links in the active trail based on route being viewed.
- Expand the descendants of the links in the active trail whose 'expanded' flag is enabled.
This only sets the (relatively complex) parameters to achieve the two above goals, but you can still further customize these parameters.
Parameters
string $menu_name: The menu name, needed for retrieving the active trail and links with the 'expanded' flag enabled.
Return value
\Drupal\Core\Menu\MenuTreeParameters The parameters to determine which menu links to be loaded into a tree.
See also
\Drupal\Core\Menu\MenuTreeParameters
1 method overrides MenuLinkTreeInterface::getCurrentRouteMenuTreeParameters()
- MenuLinkTree::getCurrentRouteMenuTreeParameters in core/
lib/ Drupal/ Core/ Menu/ MenuLinkTree.php - Gets the link tree parameters for rendering a specific menu.
File
-
core/
lib/ Drupal/ Core/ Menu/ MenuLinkTreeInterface.php, line 48
Class
- MenuLinkTreeInterface
- Defines an interface for loading, transforming and rendering menu link trees.
Namespace
Drupal\Core\MenuCode
public function getCurrentRouteMenuTreeParameters($menu_name);
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.