You are here

public function LanguageConfigFactoryOverride::addCollections in Drupal 8

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

Reacts to the ConfigEvents::COLLECTION_INFO event.

Parameters

\Drupal\Core\Config\ConfigCollectionInfo $collection_info: The configuration collection info event.

Overrides ConfigFactoryOverrideBase::addCollections

File

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

Class

LanguageConfigFactoryOverride
Provides language overrides for the configuration factory.

Namespace

Drupal\language\Config

Code

public function addCollections(ConfigCollectionInfo $collection_info) {
  foreach (\Drupal::languageManager()
    ->getLanguages() as $language) {
    $collection_info
      ->addCollection($this
      ->createConfigCollectionName($language
      ->getId()), $this);
  }
}