LanguageRequestSubscriber
class LanguageRequestSubscriber implements EventSubscriberInterface (View source)
Sets the $request property on the language manager.
Properties
| protected ConfigurableLanguageManagerInterface | $languageManager | The language manager service. |
|
| protected LanguageNegotiatorInterface | $negotiator | The language negotiator. |
|
| protected TranslatorInterface | $translation | The translation service. |
|
| protected AccountInterface | $currentUser | The current active user. |
Methods
Constructs a LanguageRequestSubscriber object.
Initializes the language manager at the beginning of the request.
Initializes config overrides whenever the service container is rebuilt.
Registers the methods in this class that should be listeners.
Details
__construct(ConfigurableLanguageManagerInterface $language_manager, LanguageNegotiatorInterface $negotiator, TranslatorInterface $translation, AccountInterface $current_user)
Constructs a LanguageRequestSubscriber object.
onKernelRequestLanguage(RequestEvent $event)
Initializes the language manager at the beginning of the request.
onContainerInitializeSubrequestFinished()
Initializes config overrides whenever the service container is rebuilt.
static array
getSubscribedEvents()
Registers the methods in this class that should be listeners.