You are here

public function DomainConfigUIManager::getSelectedLanguageId in Domain Access 8

Get the selected language ID.

Return value

string A language code.

Overrides DomainConfigUIManagerInterface::getSelectedLanguageId

1 call to DomainConfigUIManager::getSelectedLanguageId()
DomainConfigUIManager::getSelectedConfigName in domain_config_ui/src/DomainConfigUIManager.php
Get selected config name.

File

domain_config_ui/src/DomainConfigUIManager.php, line 67

Class

DomainConfigUIManager
Domain Config UI manager.

Namespace

Drupal\domain_config_ui

Code

public function getSelectedLanguageId() {
  if (!empty($this
    ->getRequest()) && ($language = $this->currentRequest
    ->get('domain_config_ui_language'))) {
    return $language;
  }
  elseif (isset($_SESSION['domain_config_ui_language'])) {
    return $_SESSION['domain_config_ui_language'];
  }
}