function MenuActiveTrail::__construct

Same name in this branch
  1. main core/lib/Drupal/Core/ProxyClass/Menu/MenuActiveTrail.php \Drupal\Core\ProxyClass\Menu\MenuActiveTrail::__construct()
Same name and namespace in other branches
  1. 11.x core/lib/Drupal/Core/ProxyClass/Menu/MenuActiveTrail.php \Drupal\Core\ProxyClass\Menu\MenuActiveTrail::__construct()
  2. 11.x core/lib/Drupal/Core/Menu/MenuActiveTrail.php \Drupal\Core\Menu\MenuActiveTrail::__construct()
  3. 10 core/lib/Drupal/Core/ProxyClass/Menu/MenuActiveTrail.php \Drupal\Core\ProxyClass\Menu\MenuActiveTrail::__construct()
  4. 10 core/lib/Drupal/Core/Menu/MenuActiveTrail.php \Drupal\Core\Menu\MenuActiveTrail::__construct()
  5. 9 core/lib/Drupal/Core/Menu/MenuActiveTrail.php \Drupal\Core\Menu\MenuActiveTrail::__construct()
  6. 8.9.x core/lib/Drupal/Core/Menu/MenuActiveTrail.php \Drupal\Core\Menu\MenuActiveTrail::__construct()

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

Parameters

\Drupal\Core\Menu\MenuLinkManagerInterface $menuLinkManager: The menu link plugin manager.

\Drupal\Core\Routing\RouteMatchInterface $routeMatch: A route match object for finding the active link.

\Drupal\Core\Cache\CacheBackendInterface $cache: The cache backend.

\Drupal\Core\Lock\LockBackendInterface $lock: The lock backend.

\Drupal\Core\Path\PathMatcherInterface $pathMatcher: The path.matcher service.

Overrides CacheCollector::__construct

File

core/lib/Drupal/Core/Menu/MenuActiveTrail.php, line 33

Class

MenuActiveTrail
Provides the default implementation of the active menu trail service.

Namespace

Drupal\Core\Menu

Code

public function __construct(protected MenuLinkManagerInterface $menuLinkManager, protected RouteMatchInterface $routeMatch, CacheBackendInterface $cache, LockBackendInterface $lock, protected PathMatcherInterface $pathMatcher) {
  parent::__construct(NULL, $cache, $lock);
}

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