function MenuLinkManager::__construct

Same name in other branches
  1. 9 core/lib/Drupal/Core/Menu/MenuLinkManager.php \Drupal\Core\Menu\MenuLinkManager::__construct()
  2. 10 core/lib/Drupal/Core/Menu/MenuLinkManager.php \Drupal\Core\Menu\MenuLinkManager::__construct()
  3. 11.x core/lib/Drupal/Core/Menu/MenuLinkManager.php \Drupal\Core\Menu\MenuLinkManager::__construct()

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

Parameters

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

\Drupal\Core\Menu\StaticMenuLinkOverridesInterface $overrides: The service providing overrides for static links.

\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler.

File

core/lib/Drupal/Core/Menu/MenuLinkManager.php, line 106

Class

MenuLinkManager
Manages discovery, instantiation, and tree building of menu link plugins.

Namespace

Drupal\Core\Menu

Code

public function __construct(MenuTreeStorageInterface $tree_storage, StaticMenuLinkOverridesInterface $overrides, ModuleHandlerInterface $module_handler) {
    $this->treeStorage = $tree_storage;
    $this->overrides = $overrides;
    $this->moduleHandler = $module_handler;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.