You are here

public function LocaleDefaultConfigStorage::__construct in Drupal 9

Same name and namespace in other branches
  1. 8 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);
}