You are here

public static function RedirectPathTranslatorSubscriber::getSubscribedEvents in Decoupled Router 8

Same name and namespace in other branches
  1. 2.x src/EventSubscriber/RedirectPathTranslatorSubscriber.php \Drupal\decoupled_router\EventSubscriber\RedirectPathTranslatorSubscriber::getSubscribedEvents()

Overrides RouterPathTranslatorSubscriber::getSubscribedEvents

File

src/EventSubscriber/RedirectPathTranslatorSubscriber.php, line 19

Class

RedirectPathTranslatorSubscriber
Event subscriber that processes a path translation with the redirect info.

Namespace

Drupal\decoupled_router\EventSubscriber

Code

public static function getSubscribedEvents() {

  // We wanna run before the router-based path translator because redirects
  // naturally act before routing subsystem in Drupal HTTP kernel.
  $events[PathTranslatorEvent::TRANSLATE][] = [
    'onPathTranslation',
    10,
  ];
  return $events;
}