public function LocaleListener::onKernelRequest in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/http-kernel/EventListener/LocaleListener.php \Symfony\Component\HttpKernel\EventListener\LocaleListener::onKernelRequest()
File
- vendor/
symfony/ http-kernel/ EventListener/ LocaleListener.php, line 71
Class
- LocaleListener
- Initializes the locale based on the current request.
Namespace
Symfony\Component\HttpKernel\EventListenerCode
public function onKernelRequest(GetResponseEvent $event) {
$request = $event
->getRequest();
$request
->setDefaultLocale($this->defaultLocale);
$this
->setLocale($request);
$this
->setRouterContext($request);
}