Subscribes to filter HTML responses, to set the 'is-active' class on links.
Only for anonymous users; for authenticated users, the active-link asset library is loaded.
Hierarchy
- class \Drupal\Core\EventSubscriber\ActiveLinkResponseFilter implements EventSubscriberInterface
See also
File
- core/lib/Drupal/Core/EventSubscriber/ActiveLinkResponseFilter.php, line 23
Namespace
Drupal\Core\EventSubscriber
Members
| Name | Modifiers | Type | Description |
|---|---|---|---|
| ActiveLinkResponseFilter::$currentPath | protected | property | The current path. |
| ActiveLinkResponseFilter::$currentUser | protected | property | The current user. |
| ActiveLinkResponseFilter::$languageManager | protected | property | The language manager. |
| ActiveLinkResponseFilter::$pathMatcher | protected | property | The path matcher. |
| ActiveLinkResponseFilter::getSubscribedEvents | public static | function | Returns an array of event names this subscriber wants to listen to. Overrides EventSubscriberInterface::getSubscribedEvents |
| ActiveLinkResponseFilter::onResponse | public | function | Sets the 'is-active' class on links. |
| ActiveLinkResponseFilter::setLinkActiveClass | public static | function | Sets the "is-active" class on relevant links. |
| ActiveLinkResponseFilter::__construct | public | function | Constructs a new ActiveLinkResponseFilter instance. |
Please login to continue.