You are here

public function MenuPositionActiveTrail::__construct in Menu Position 8

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

Parameters

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

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

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

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

\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager.

\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The config factory service.

Overrides MenuActiveTrail::__construct

File

src/Menu/MenuPositionActiveTrail.php, line 48

Class

MenuPositionActiveTrail
Menu Position active trail.

Namespace

Drupal\menu_position\Menu

Code

public function __construct(MenuLinkManagerInterface $menu_link_manager, RouteMatchInterface $route_match, CacheBackendInterface $cache, LockBackendInterface $lock, EntityTypeManagerInterface $entity_type_manager, ConfigFactoryInterface $config_factory) {
  parent::__construct($menu_link_manager, $route_match, $cache, $lock);
  $this->entityTypeManager = $entity_type_manager;
  $this->settings = $config_factory
    ->get('menu_position.settings');
}