function LocaleDefaultConfigStorage::__construct

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

Constructs a LocaleDefaultConfigStorage.

Parameters

\Drupal\Core\Config\StorageInterface $config_storage: The storage object to use for reading configuration data.

\Drupal\language\ConfigurableLanguageManagerInterface $language_manager: The language manager.

string $install_profile: The current installation profile.

File

core/modules/locale/src/LocaleDefaultConfigStorage.php, line 62

Class

LocaleDefaultConfigStorage
Provides access to default configuration for locale integration.

Namespace

Drupal\locale

Code

public function __construct(StorageInterface $config_storage, ConfigurableLanguageManagerInterface $language_manager, $install_profile) {
    $this->configStorage = $config_storage;
    $this->languageManager = $language_manager;
    $this->requiredInstallStorage = new ExtensionInstallStorage($this->configStorage, ExtensionInstallStorage::CONFIG_INSTALL_DIRECTORY, ExtensionInstallStorage::DEFAULT_COLLECTION, TRUE, $install_profile);
    $this->optionalInstallStorage = new ExtensionInstallStorage($this->configStorage, ExtensionInstallStorage::CONFIG_OPTIONAL_DIRECTORY, ExtensionInstallStorage::DEFAULT_COLLECTION, TRUE, $install_profile);
}

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