ActiveLinkResponseFilter::__construct

public ActiveLinkResponseFilter::__construct(AccountInterface $current_user, CurrentPathStack $current_path, PathMatcherInterface $path_matcher, LanguageManagerInterface $language_manager)

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\EventSubscriber

Code

1
2
3
4
5
6
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;
}
doc_Drupal
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.