You are here

public function DisableLanguageManager::getFirstEnabledLanguage in Disable language 8

File

src/DisableLanguageManager.php, line 148

Class

DisableLanguageManager
Class DisableLanguageManager.

Namespace

Drupal\disable_language

Code

public function getFirstEnabledLanguage() {
  $enabledLanguages = $this
    ->getEnabledLanguages();
  $configurableLanguage = reset($enabledLanguages);
  return $this
    ->getLanguage($configurableLanguage
    ->getId());
}