function LanguageRequestSubscriber::onKernelRequestLanguage

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

Initializes the language manager at the beginning of the request.

Parameters

\Symfony\Component\HttpKernel\Event\GetResponseEvent $event: The Event to process.

File

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

Class

LanguageRequestSubscriber
Sets the $request property on the language manager.

Namespace

Drupal\language\EventSubscriber

Code

public function onKernelRequestLanguage(GetResponseEvent $event) {
    if ($event->isMasterRequest()) {
        $this->setLanguageOverrides();
    }
}

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