function ActiveLinkResponseFilter::__construct

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/EventSubscriber/ActiveLinkResponseFilter.php \Drupal\Core\EventSubscriber\ActiveLinkResponseFilter::__construct()
  2. 8.9.x core/lib/Drupal/Core/EventSubscriber/ActiveLinkResponseFilter.php \Drupal\Core\EventSubscriber\ActiveLinkResponseFilter::__construct()
  3. 10 core/lib/Drupal/Core/EventSubscriber/ActiveLinkResponseFilter.php \Drupal\Core\EventSubscriber\ActiveLinkResponseFilter::__construct()

Constructs a new ActiveLinkResponseFilter instance.

Parameters

\Drupal\Core\Session\AccountInterface $current_user: The current user.

\Drupal\Core\Path\CurrentPathStack $current_path: The current path.

\Drupal\Core\Path\PathMatcherInterface $path_matcher: The path matcher.

\Drupal\Core\Language\LanguageManagerInterface $language_manager: The language manager.

File

core/lib/Drupal/Core/EventSubscriber/ActiveLinkResponseFilter.php, line 68

Class

ActiveLinkResponseFilter
Subscribes to filter HTML responses, to set attributes on active links.

Namespace

Drupal\Core\EventSubscriber

Code

public function __construct(AccountInterface $current_user, CurrentPathStack $current_path, PathMatcherInterface $path_matcher, LanguageManagerInterface $language_manager) {
    $this->currentUser = $current_user;
    $this->currentPath = $current_path;
    $this->pathMatcher = $path_matcher;
    $this->languageManager = $language_manager;
}

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