function LanguageConfigCollectionNameTrait::createConfigCollectionName

Same name in other branches
  1. 8.9.x core/modules/language/src/Config/LanguageConfigCollectionNameTrait.php \Drupal\language\Config\LanguageConfigCollectionNameTrait::createConfigCollectionName()
  2. 10 core/modules/language/src/Config/LanguageConfigCollectionNameTrait.php \Drupal\language\Config\LanguageConfigCollectionNameTrait::createConfigCollectionName()
  3. 11.x core/modules/language/src/Config/LanguageConfigCollectionNameTrait.php \Drupal\language\Config\LanguageConfigCollectionNameTrait::createConfigCollectionName()

Creates a configuration collection name based on a language code.

Parameters

string $langcode: The language code.

Return value

string The configuration collection name for a language code.

3 calls to LanguageConfigCollectionNameTrait::createConfigCollectionName()
LanguageConfigFactoryOverride::addCollections in core/modules/language/src/Config/LanguageConfigFactoryOverride.php
Reacts to the ConfigEvents::COLLECTION_INFO event.
LanguageConfigFactoryOverride::getStorage in core/modules/language/src/Config/LanguageConfigFactoryOverride.php
Returns the storage instance for a particular langcode.
LanguageConfigFactoryOverride::installLanguageOverrides in core/modules/language/src/Config/LanguageConfigFactoryOverride.php
Installs available language configuration overrides for a given langcode.

File

core/modules/language/src/Config/LanguageConfigCollectionNameTrait.php, line 19

Class

LanguageConfigCollectionNameTrait
Provides a common trait for working with language override collection names.

Namespace

Drupal\language\Config

Code

protected function createConfigCollectionName($langcode) {
    return 'language.' . $langcode;
}

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