You are here

public function DisableLanguageManager::getConfigurableLanguages in Disable language 8

3 calls to DisableLanguageManager::getConfigurableLanguages()
DisableLanguageManager::getDisabledLanguages in src/DisableLanguageManager.php
DisableLanguageManager::getEnabledLanguages in src/DisableLanguageManager.php
DisableLanguageManager::getFallbackLanguage in src/DisableLanguageManager.php
Determine and return the fallback language id.

File

src/DisableLanguageManager.php, line 78

Class

DisableLanguageManager
Class DisableLanguageManager.

Namespace

Drupal\disable_language

Code

public function getConfigurableLanguages() {
  $configurableLanguages = [];

  // Get all languages.
  $languages = $this
    ->getLanguages();

  // The language itself doesn't own the thirdPartySetting,
  // So we need to use its matching ConfigEntity
  // Getting the ConfigurableLanguageManager.
  $configManager = $this->entityTypeManager
    ->getStorage('configurable_language');
  $configurableLanguages = $configManager
    ->loadMultiple(array_keys($languages));
  return $configurableLanguages;
}