function LanguageNegotiator::initLanguageManager
Same name in other branches
- 9 core/modules/language/src/LanguageNegotiator.php \Drupal\language\LanguageNegotiator::initLanguageManager()
- 8.9.x core/modules/language/src/LanguageNegotiator.php \Drupal\language\LanguageNegotiator::initLanguageManager()
- 10 core/modules/language/src/LanguageNegotiator.php \Drupal\language\LanguageNegotiator::initLanguageManager()
Initializes the injected language manager with the negotiator.
This should be called right after instantiating the negotiator to make it available to the language manager without introducing a circular dependency.
File
-
core/
modules/ language/ src/ LanguageNegotiator.php, line 105
Class
- LanguageNegotiator
- Class responsible for performing language negotiation.
Namespace
Drupal\languageCode
public function initLanguageManager() {
$this->languageManager
->setNegotiator($this);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.