function LocaleConfigManager::__construct

Same name and namespace in other branches
  1. 10 core/modules/locale/src/LocaleConfigManager.php \Drupal\locale\LocaleConfigManager::__construct()
  2. 9 core/modules/locale/src/LocaleConfigManager.php \Drupal\locale\LocaleConfigManager::__construct()
  3. 8.9.x core/modules/locale/src/LocaleConfigManager.php \Drupal\locale\LocaleConfigManager::__construct()
  4. main core/modules/locale/src/LocaleConfigManager.php \Drupal\locale\LocaleConfigManager::__construct()

File

core/modules/locale/src/LocaleConfigManager.php, line 53

Class

LocaleConfigManager
Manages configuration supported in part by interface translation.

Namespace

Drupal\locale

Code

public function __construct(#[Autowire(service: 'config.storage')] protected StorageInterface $configStorage, protected StringStorageInterface $localeStorage, protected ConfigFactoryInterface $configFactory, protected TypedConfigManagerInterface $typedConfigManager, #[Autowire(service: 'language_manager')] protected ConfigurableLanguageManagerInterface $languageManager, protected LocaleDefaultConfigStorage $defaultConfigStorage, protected ConfigManagerInterface $configManager, protected ?LocaleLanguages $localeLanguages = NULL) {
  if ($this->localeLanguages === NULL) {
    @trigger_error('Calling ' . __METHOD__ . '() without the $localeLanguages argument is deprecated in drupal:11.5.0 and it will be required in drupal:12.0.0. See https://www.drupal.org/project/drupal/issues/3616293', E_USER_DEPRECATED);
    $this->localeLanguages = \Drupal::service(LocaleLanguages::class);
  }
}

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