function LanguageNegotiator::getNegotiationMethods

Same name in other branches
  1. 9 core/modules/language/src/LanguageNegotiator.php \Drupal\language\LanguageNegotiator::getNegotiationMethods()
  2. 8.9.x core/modules/language/src/LanguageNegotiator.php \Drupal\language\LanguageNegotiator::getNegotiationMethods()
  3. 10 core/modules/language/src/LanguageNegotiator.php \Drupal\language\LanguageNegotiator::getNegotiationMethods()
2 calls to LanguageNegotiator::getNegotiationMethods()
LanguageNegotiator::saveConfiguration in core/modules/language/src/LanguageNegotiator.php
LanguageNegotiator::updateConfiguration in core/modules/language/src/LanguageNegotiator.php

File

core/modules/language/src/LanguageNegotiator.php, line 207

Class

LanguageNegotiator
Class responsible for performing language negotiation.

Namespace

Drupal\language

Code

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;
}

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