ActiveLinkResponseFilter

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

See also

system_page_attachments()

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.
doc_Drupal
2016-10-29 08:43:25
Comments
Leave a Comment

Please login to continue.