function LanguageRequestSubscriber::getSubscribedEvents

Same name in other branches
  1. 9 core/modules/language/src/EventSubscriber/LanguageRequestSubscriber.php \Drupal\language\EventSubscriber\LanguageRequestSubscriber::getSubscribedEvents()
  2. 8.9.x core/modules/language/src/EventSubscriber/LanguageRequestSubscriber.php \Drupal\language\EventSubscriber\LanguageRequestSubscriber::getSubscribedEvents()
  3. 11.x core/modules/language/src/EventSubscriber/LanguageRequestSubscriber.php \Drupal\language\EventSubscriber\LanguageRequestSubscriber::getSubscribedEvents()

Registers the methods in this class that should be listeners.

Return value

array An array of event listener definitions.

File

core/modules/language/src/EventSubscriber/LanguageRequestSubscriber.php, line 106

Class

LanguageRequestSubscriber
Sets the $request property on the language manager.

Namespace

Drupal\language\EventSubscriber

Code

public static function getSubscribedEvents() : array {
    $events[KernelEvents::REQUEST][] = [
        'onKernelRequestLanguage',
        255,
    ];
    $events[DrupalKernelInterface::CONTAINER_INITIALIZE_SUBREQUEST_FINISHED][] = [
        'onContainerInitializeSubrequestFinished',
        255,
    ];
    return $events;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.