function LanguageConfigFactoryOverride::__construct
Same name and namespace in other branches
- 10 core/modules/language/src/Config/LanguageConfigFactoryOverride.php \Drupal\language\Config\LanguageConfigFactoryOverride::__construct()
- 11.x core/modules/language/src/Config/LanguageConfigFactoryOverride.php \Drupal\language\Config\LanguageConfigFactoryOverride::__construct()
- 9 core/modules/language/src/Config/LanguageConfigFactoryOverride.php \Drupal\language\Config\LanguageConfigFactoryOverride::__construct()
- 8.9.x core/modules/language/src/Config/LanguageConfigFactoryOverride.php \Drupal\language\Config\LanguageConfigFactoryOverride::__construct()
File
-
core/
modules/ language/ src/ Config/ LanguageConfigFactoryOverride.php, line 39
Class
- LanguageConfigFactoryOverride
- Provides language overrides for the configuration factory.
Namespace
Drupal\language\ConfigCode
public function __construct(protected StorageInterface $baseStorage, protected EventDispatcherInterface $eventDispatcher, protected TypedConfigManagerInterface $typedConfigManager, LanguageDefault $default_language, protected ?array $defaultLanguageValues, protected ?bool $translateEnglish = TRUE) {
// Prior to negotiation the override language should be the default
// language.
$this->language = $default_language->get();
if ($this->defaultLanguageValues === NULL) {
@trigger_error('Not passing the language.default_values parameter to LanguageConfigFactoryOverride::__construct() is deprecated in drupal:11.3.0 and it will be required in drupal::12.0.0. See https://www.drupal.org/project/drupal/issues/3518992');
$this->defaultLanguageValues = \Drupal::getContainer()->getParameter('language.default_values');
}
if ($this->translateEnglish === NULL) {
@trigger_error('Not passing the language.translate_english parameter to LanguageConfigFactoryOverride::__construct() is deprecated in drupal:11.3.0 and it will be required in drupal::12.0.0. See https://www.drupal.org/project/drupal/issues/3518992');
$this->translateEnglish = \Drupal::getContainer()->getParameter('language.translate_english');
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.