You are here

public function DisableLanguageManager::getDisabledLanguages in Disable language 8

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

File

src/DisableLanguageManager.php, line 97

Class

DisableLanguageManager
Class DisableLanguageManager.

Namespace

Drupal\disable_language

Code

public function getDisabledLanguages() {
  if (empty($this->disabledLanguages)) {
    foreach ($this
      ->getConfigurableLanguages() as $langcode => $configurableLanguage) {
      $disabled = $configurableLanguage
        ->getThirdPartySetting('disable_language', 'disable');
      if (isset($disabled) && $disabled == 1) {
        $this->disabledLanguages[$langcode] = $configurableLanguage;
      }
    }
  }
  return $this->disabledLanguages;
}