function ConfigurableLanguageManager::getDefinedLanguageTypesInfo

Same name in other branches
  1. 9 core/modules/language/src/ConfigurableLanguageManager.php \Drupal\language\ConfigurableLanguageManager::getDefinedLanguageTypesInfo()
  2. 8.9.x core/modules/language/src/ConfigurableLanguageManager.php \Drupal\language\ConfigurableLanguageManager::getDefinedLanguageTypesInfo()
  3. 10 core/modules/language/src/ConfigurableLanguageManager.php \Drupal\language\ConfigurableLanguageManager::getDefinedLanguageTypesInfo()

Overrides LanguageManager::getDefinedLanguageTypesInfo

File

core/modules/language/src/ConfigurableLanguageManager.php, line 179

Class

ConfigurableLanguageManager
Overrides default LanguageManager to provide configured languages.

Namespace

Drupal\language

Code

public function getDefinedLanguageTypesInfo() {
    if (!isset($this->languageTypesInfo)) {
        $defaults = parent::getDefinedLanguageTypesInfo();
        $info = $this->moduleHandler
            ->invokeAll('language_types_info');
        $language_info = $info + $defaults;
        // Let other modules alter the list of language types.
        $this->moduleHandler
            ->alter('language_types_info', $language_info);
        $this->languageTypesInfo = $language_info;
    }
    return $this->languageTypesInfo;
}

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