You are here

public static function ActiveLinkResponseFilter::getSubscribedEvents in Drupal 9

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/EventSubscriber/ActiveLinkResponseFilter.php \Drupal\Core\EventSubscriber\ActiveLinkResponseFilter::getSubscribedEvents()

File

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

Class

ActiveLinkResponseFilter
Subscribes to filter HTML responses, to set the 'is-active' class on links.

Namespace

Drupal\Core\EventSubscriber

Code

public static function getSubscribedEvents() {

  // Should run after any other response subscriber that modifies the markup.
  $events[KernelEvents::RESPONSE][] = [
    'onResponse',
    -512,
  ];
  return $events;
}