function ConfigSubscriber::__construct

Same name in this branch
  1. main core/modules/locale/src/EventSubscriber/ConfigSubscriber.php \Drupal\locale\EventSubscriber\ConfigSubscriber::__construct()
Same name and namespace in other branches
  1. 10 core/modules/language/src/EventSubscriber/ConfigSubscriber.php \Drupal\language\EventSubscriber\ConfigSubscriber::__construct()
  2. 11.x core/modules/language/src/EventSubscriber/ConfigSubscriber.php \Drupal\language\EventSubscriber\ConfigSubscriber::__construct()
  3. 9 core/modules/language/src/EventSubscriber/ConfigSubscriber.php \Drupal\language\EventSubscriber\ConfigSubscriber::__construct()
  4. 8.9.x core/modules/language/src/EventSubscriber/ConfigSubscriber.php \Drupal\language\EventSubscriber\ConfigSubscriber::__construct()
  5. 11.x core/modules/locale/src/EventSubscriber/ConfigSubscriber.php \Drupal\locale\EventSubscriber\ConfigSubscriber::__construct()

Constructs a new class object.

Parameters

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

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

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

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

File

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

Class

ConfigSubscriber
Deletes the container if default language has changed.

Namespace

Drupal\language\EventSubscriber

Code

public function __construct(protected LanguageManagerInterface $languageManager, protected LanguageDefault $languageDefault, protected ConfigFactoryInterface $configFactory, protected LanguageNegotiatorInterface $languageNegotiator) {
}

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