public function MenuLinkTree::__construct in Drupal 10
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Menu/MenuLinkTree.php \Drupal\Core\Menu\MenuLinkTree::__construct()
- 9 core/lib/Drupal/Core/Menu/MenuLinkTree.php \Drupal\Core\Menu\MenuLinkTree::__construct()
Constructs a \Drupal\Core\Menu\MenuLinkTree object.
Parameters
\Drupal\Core\Menu\MenuTreeStorageInterface $tree_storage: The menu link tree storage.
\Drupal\Core\Menu\MenuLinkManagerInterface $menu_link_manager: The menu link plugin manager.
\Drupal\Core\Routing\RouteProviderInterface $route_provider: The route provider to load routes by name.
\Drupal\Core\Menu\MenuActiveTrailInterface $menu_active_trail: The active menu trail service.
\Drupal\Core\Controller\ControllerResolverInterface $controller_resolver: The controller resolver.
File
- core/
lib/ Drupal/ Core/ Menu/ MenuLinkTree.php, line 67
Class
- MenuLinkTree
- Implements the loading, transforming and rendering of menu link trees.
Namespace
Drupal\Core\MenuCode
public function __construct(MenuTreeStorageInterface $tree_storage, MenuLinkManagerInterface $menu_link_manager, RouteProviderInterface $route_provider, MenuActiveTrailInterface $menu_active_trail, ControllerResolverInterface $controller_resolver) {
$this->treeStorage = $tree_storage;
$this->menuLinkManager = $menu_link_manager;
$this->routeProvider = $route_provider;
$this->menuActiveTrail = $menu_active_trail;
$this->controllerResolver = $controller_resolver;
}