private function LocaleListener::setRouterContext in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/symfony/http-kernel/EventListener/LocaleListener.php \Symfony\Component\HttpKernel\EventListener\LocaleListener::setRouterContext()
3 calls to LocaleListener::setRouterContext()
- LocaleListener::onKernelFinishRequest in vendor/
symfony/ http-kernel/ EventListener/ LocaleListener.php - LocaleListener::onKernelRequest in vendor/
symfony/ http-kernel/ EventListener/ LocaleListener.php - LocaleListener::setRequest in vendor/
symfony/ http-kernel/ EventListener/ LocaleListener.php - Sets the current Request.
File
- vendor/
symfony/ http-kernel/ EventListener/ LocaleListener.php, line 98
Class
- LocaleListener
- Initializes the locale based on the current request.
Namespace
Symfony\Component\HttpKernel\EventListenerCode
private function setRouterContext(Request $request) {
if (null !== $this->router) {
$this->router
->getContext()
->setParameter('_locale', $request
->getLocale());
}
}