Drupal 8  8.0.2
ConfigSubscriber Class Reference
Inheritance diagram for ConfigSubscriber:

Public Member Functions

 __construct (LanguageManagerInterface $language_manager, LanguageDefault $language_default, ConfigFactoryInterface $config_factory, LanguageNegotiatorInterface $language_negotiator)
 
 onConfigSave (ConfigCrudEvent $event)
 
 setPathProcessorLanguage (PathProcessorLanguage $path_processor_language)
 

Static Public Member Functions

static getSubscribedEvents ()
 

Protected Attributes

 $languageManager
 
 $languageDefault
 
 $configFactory
 
 $languageNegotiator
 
 $pathProcessorLanguage
 

Detailed Description

Deletes the container if default language has changed.

Constructor & Destructor Documentation

__construct ( LanguageManagerInterface  $language_manager,
LanguageDefault  $language_default,
ConfigFactoryInterface  $config_factory,
LanguageNegotiatorInterface  $language_negotiator 
)

Constructs a new class object.

Parameters
\Drupal\Core\Language\LanguageManagerInterface$language_managerThe language manager.
\Drupal\Core\Language\LanguageDefault$language_defaultThe default language.
\Drupal\Core\Config\ConfigFactoryInterface$config_factoryThe configuration factory.
\Drupal\language\LanguageNegotiatorInterface$language_negotiatorThe language negotiator.

References Drupal\configFactory(), and Drupal\languageManager().

Here is the call graph for this function:

Member Function Documentation

static getSubscribedEvents ( )
static

{}

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.

Parameters
ConfigCrudEvent$eventThe configuration event.

References Drupal\configFactory(), ConfigCrudEvent\getConfig(), ConfigCrudEvent\isChanged(), Drupal\languageManager(), and ConfigurableLanguageManager\rebuildServices().

Here is the call graph for this function:

setPathProcessorLanguage ( PathProcessorLanguage  $path_processor_language)

Injects the language path processors on multilingual site configuration.

Parameters
\Drupal\language\HttpKernel\PathProcessorLanguage$path_processor_languageThe language path processor.

The documentation for this class was generated from the following file: