You are here

public static function DomainRedirectRequestSubscriber::getSubscribedEvents in Redirect 8

File

modules/redirect_domain/src/EventSubscriber/DomainRedirectRequestSubscriber.php, line 130

Class

DomainRedirectRequestSubscriber
Redirect subscriber for controller requests.

Namespace

Drupal\redirect_domain\EventSubscriber

Code

public static function getSubscribedEvents() {

  // This needs to run before RouterListener::onKernelRequest(), which has
  // a priority of 32 and
  // RedirectRequestSubscriber::onKernelRequestCheckRedirect(), which has
  // a priority of 33. Otherwise, that aborts the request if no matching
  // route is found.
  $events[KernelEvents::REQUEST][] = [
    'onKernelRequestCheckDomainRedirect',
    34,
  ];
  return $events;
}