public function ActiveLinkResponseFilter::__construct in Drupal 8
Same name and namespace in other branches
- 9 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 65
Class
- ActiveLinkResponseFilter
- Subscribes to filter HTML responses, to set the 'is-active' class on links.
Namespace
Drupal\Core\EventSubscriberCode
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;
}