public function DisableLanguageManager::getEnabledLanguages in Disable language 8
1 call to DisableLanguageManager::getEnabledLanguages()
File
- src/
DisableLanguageManager.php, line 113
Class
- DisableLanguageManager
- Class DisableLanguageManager.
Namespace
Drupal\disable_languageCode
public function getEnabledLanguages() {
if (empty($this->enabledLanguages)) {
foreach ($this
->getConfigurableLanguages() as $langcode => $configurableLanguage) {
$disabled = $configurableLanguage
->getThirdPartySetting('disable_language', 'disable');
if (isset($disabled) && $disabled == 0 || empty($disabled)) {
$this->enabledLanguages[$langcode] = $configurableLanguage;
}
}
}
return $this->enabledLanguages;
}