class LanguageNegotiationUI
Identifies the language from the interface text language selected for page.
Hierarchy
- class \Drupal\language\LanguageNegotiationMethodBase implements \Drupal\language\LanguageNegotiationMethodInterface
- class \Drupal\language\Plugin\LanguageNegotiation\LanguageNegotiationUI extends \Drupal\language\LanguageNegotiationMethodBase
Expanded class hierarchy of LanguageNegotiationUI
2 files declare their use of LanguageNegotiationUI
- LanguageHooks.php in core/
modules/ language/ src/ Hook/ LanguageHooks.php - LanguageNegotiator.php in core/
modules/ language/ src/ LanguageNegotiator.php
File
-
core/
modules/ language/ src/ Plugin/ LanguageNegotiation/ LanguageNegotiationUI.php, line 14
Namespace
Drupal\language\Plugin\LanguageNegotiationView source
class LanguageNegotiationUI extends LanguageNegotiationMethodBase {
/**
* The language negotiation method id.
*/
const METHOD_ID = 'language-interface';
/**
* {@inheritdoc}
*/
public function getLangcode(?Request $request = NULL) {
return $this->languageManager ? $this->languageManager
->getCurrentLanguage()
->getId() : NULL;
}
}