private function LocaleListener::setLocale 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::setLocale()
2 calls to LocaleListener::setLocale()
- 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 91
Class
- LocaleListener
- Initializes the locale based on the current request.
Namespace
Symfony\Component\HttpKernel\EventListenerCode
private function setLocale(Request $request) {
if ($locale = $request->attributes
->get('_locale')) {
$request
->setLocale($locale);
}
}