ConfigurableLanguageManager::getNegotiatedLanguageMethod

public ConfigurableLanguageManager::getNegotiatedLanguageMethod($type = LanguageInterface::TYPE_INTERFACE)

Gets the negotiated language method ID.

Parameters

string $type: (optional) The language type; e.g., the interface or the content language.

Return value

string The negotiated language method ID.

Overrides ConfigurableLanguageManagerInterface::getNegotiatedLanguageMethod

File

core/modules/language/src/ConfigurableLanguageManager.php, line 477

Class

ConfigurableLanguageManager
Overrides default LanguageManager to provide configured languages.

Namespace

Drupal\language

Code

public function getNegotiatedLanguageMethod($type = LanguageInterface::TYPE_INTERFACE) {
  if (isset($this->negotiatedLanguages[$type]) && isset($this->negotiatedMethods[$type])) {
    return $this->negotiatedMethods[$type];
  }
}
doc_Drupal
2016-10-29 08:55:16
Comments
Leave a Comment

Please login to continue.