public function LanguageNegotiator::getNegotiationMethods in Drupal 10
Same name and namespace in other branches
- 8 core/modules/language/src/LanguageNegotiator.php \Drupal\language\LanguageNegotiator::getNegotiationMethods()
- 9 core/modules/language/src/LanguageNegotiator.php \Drupal\language\LanguageNegotiator::getNegotiationMethods()
File
- core/
modules/ language/ src/ LanguageNegotiator.php, line 198
Class
- LanguageNegotiator
- Class responsible for performing language negotiation.
Namespace
Drupal\languageCode
public function getNegotiationMethods($type = NULL) {
$definitions = $this->negotiatorManager
->getDefinitions();
if (isset($type)) {
$enabled_methods = $this
->getEnabledNegotiators($type);
$definitions = array_intersect_key($definitions, $enabled_methods);
}
return $definitions;
}