You are here

public function MenuLinkTree::__construct in Colossal Menu 8

Same name and namespace in other branches
  1. 2.x src/Menu/MenuLinkTree.php \Drupal\colossal_menu\Menu\MenuLinkTree::__construct()

Constructs a \Drupal\Core\Menu\MenuLinkTree object.

Parameters

\Drupal\Core\Menu\MenuTreeStorageInterface $tree_storage: The menu link tree storage.

\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.

\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The EntityTypeManager service.

Overrides MenuLinkTree::__construct

File

src/Menu/MenuLinkTree.php, line 41

Class

MenuLinkTree
Implements the loading, transforming and rendering of menu link trees.

Namespace

Drupal\colossal_menu\Menu

Code

public function __construct(MenuTreeStorageInterface $tree_storage, RouteProviderInterface $route_provider, MenuActiveTrailInterface $menu_active_trail, ControllerResolverInterface $controller_resolver, EntityTypeManagerInterface $entity_type_manager) {
  $this->treeStorage = $tree_storage;
  $this->routeProvider = $route_provider;
  $this->menuActiveTrail = $menu_active_trail;
  $this->controllerResolver = $controller_resolver;
  $this->entityTypeManager = $entity_type_manager;
}