function ConfigurableLanguageManager::setNegotiator

Same name in other branches
  1. 9 core/modules/language/src/ConfigurableLanguageManager.php \Drupal\language\ConfigurableLanguageManager::setNegotiator()
  2. 8.9.x core/modules/language/src/ConfigurableLanguageManager.php \Drupal\language\ConfigurableLanguageManager::setNegotiator()
  3. 11.x core/modules/language/src/ConfigurableLanguageManager.php \Drupal\language\ConfigurableLanguageManager::setNegotiator()

Overrides ConfigurableLanguageManagerInterface::setNegotiator

File

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

Class

ConfigurableLanguageManager
Overrides default LanguageManager to provide configured languages.

Namespace

Drupal\language

Code

public function setNegotiator(LanguageNegotiatorInterface $negotiator) {
    $this->negotiator = $negotiator;
    $this->initialized = FALSE;
    $this->negotiatedLanguages = [];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.