You are here

public function LocaleListener::onKernelFinishRequest in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/http-kernel/EventListener/LocaleListener.php \Symfony\Component\HttpKernel\EventListener\LocaleListener::onKernelFinishRequest()

File

vendor/symfony/http-kernel/EventListener/LocaleListener.php, line 80

Class

LocaleListener
Initializes the locale based on the current request.

Namespace

Symfony\Component\HttpKernel\EventListener

Code

public function onKernelFinishRequest(FinishRequestEvent $event) {
  if (null === $this->requestStack) {
    return;

    // removed when requestStack is required
  }
  if (null !== ($parentRequest = $this->requestStack
    ->getParentRequest())) {
    $this
      ->setRouterContext($parentRequest);
  }
}