ConfigSubscriber
class ConfigSubscriber implements EventSubscriberInterface (View source)
Deletes the container if default language has changed.
Properties
| protected LanguageManagerInterface | $languageManager | The language manager. |
|
| protected LanguageDefault | $languageDefault | The default language. |
|
| protected ConfigFactoryInterface | $configFactory | The configuration factory. |
|
| protected LanguageNegotiatorInterface | $languageNegotiator | The language negotiator. |
|
| protected PathProcessorLanguage | $pathProcessorLanguage | The language path processor. |
Methods
Constructs a new class object.
Injects the language path processors on multilingual site configuration.
{@inheritdoc}
Details
__construct(LanguageManagerInterface $language_manager, LanguageDefault $language_default, ConfigFactoryInterface $config_factory, LanguageNegotiatorInterface $language_negotiator)
Constructs a new class object.
onConfigSave(ConfigCrudEvent $event)
Causes the container to be rebuilt on the next request.
This event subscriber assumes that the new default langcode and old default langcode are valid langcodes. If the schema definition of either system.site:default_langcode or language.negotiation::url.prefixes changes then this event must be changed to work with both the old and new schema definition so this event is update safe.
setPathProcessorLanguage(PathProcessorLanguage $path_processor_language)
Injects the language path processors on multilingual site configuration.
static array
getSubscribedEvents()
{@inheritdoc}