function ConfigSubscriber::__construct

Same name in other branches
  1. 8.9.x core/modules/language/src/EventSubscriber/ConfigSubscriber.php \Drupal\language\EventSubscriber\ConfigSubscriber::__construct()
  2. 10 core/modules/language/src/EventSubscriber/ConfigSubscriber.php \Drupal\language\EventSubscriber\ConfigSubscriber::__construct()
  3. 11.x core/modules/language/src/EventSubscriber/ConfigSubscriber.php \Drupal\language\EventSubscriber\ConfigSubscriber::__construct()

Constructs a new class object.

Parameters

\Drupal\Core\Language\LanguageManagerInterface $language_manager: The language manager.

\Drupal\Core\Language\LanguageDefault $language_default: The default language.

\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The configuration factory.

\Drupal\language\LanguageNegotiatorInterface $language_negotiator: The language negotiator.

File

core/modules/language/src/EventSubscriber/ConfigSubscriber.php, line 68

Class

ConfigSubscriber
Deletes the container if default language has changed.

Namespace

Drupal\language\EventSubscriber

Code

public function __construct(LanguageManagerInterface $language_manager, LanguageDefault $language_default, ConfigFactoryInterface $config_factory, LanguageNegotiatorInterface $language_negotiator) {
    $this->languageManager = $language_manager;
    $this->languageDefault = $language_default;
    $this->configFactory = $config_factory;
    $this->languageNegotiator = $language_negotiator;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.