class LanguageNegotiationUI
Same name in other branches
- 9 core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationUI.php \Drupal\language\Plugin\LanguageNegotiation\LanguageNegotiationUI
- 8.9.x core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationUI.php \Drupal\language\Plugin\LanguageNegotiation\LanguageNegotiationUI
- 10 core/modules/language/src/Plugin/LanguageNegotiation/LanguageNegotiationUI.php \Drupal\language\Plugin\LanguageNegotiation\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
4 files declare their use of LanguageNegotiationUI
- LanguageHooks.php in core/
modules/ language/ src/ Hook/ LanguageHooks.php - LanguageNegotiationInfoTest.php in core/
modules/ language/ tests/ src/ Functional/ LanguageNegotiationInfoTest.php - LanguageNegotiator.php in core/
modules/ language/ src/ LanguageNegotiator.php - LanguageTestHooks.php in core/
modules/ language/ tests/ language_test/ src/ Hook/ LanguageTestHooks.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;
}
}
Members
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.