You are here

public function LanguageConfigFactoryOverride::getStorage in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/language/src/Config/LanguageConfigFactoryOverride.php \Drupal\language\Config\LanguageConfigFactoryOverride::getStorage()
  2. 10 core/modules/language/src/Config/LanguageConfigFactoryOverride.php \Drupal\language\Config\LanguageConfigFactoryOverride::getStorage()

Returns the storage instance for a particular langcode.

Parameters

string $langcode: Language code.

Return value

\Drupal\Core\Config\StorageInterface The storage instance for a particular langcode.

Overrides LanguageConfigFactoryOverrideInterface::getStorage

3 calls to LanguageConfigFactoryOverride::getStorage()
LanguageConfigFactoryOverride::getOverride in core/modules/language/src/Config/LanguageConfigFactoryOverride.php
Get language override for given language and configuration name.
LanguageConfigFactoryOverride::loadOverrides in core/modules/language/src/Config/LanguageConfigFactoryOverride.php
Returns config overrides.
LanguageConfigFactoryOverride::onConfigRename in core/modules/language/src/Config/LanguageConfigFactoryOverride.php
Actions to be performed to configuration override on configuration rename.

File

core/modules/language/src/Config/LanguageConfigFactoryOverride.php, line 117

Class

LanguageConfigFactoryOverride
Provides language overrides for the configuration factory.

Namespace

Drupal\language\Config

Code

public function getStorage($langcode) {
  if (!isset($this->storages[$langcode])) {
    $this->storages[$langcode] = $this->baseStorage
      ->createCollection($this
      ->createConfigCollectionName($langcode));
  }
  return $this->storages[$langcode];
}