function LanguageNegotiator::getNegotiationMethods
Returns the language negotiation methods enabled for a language type.
Parameters
string $type: (optional) The language type. If no type is specified all the method definitions are returned.
Return value
array[] An array of language negotiation method definitions keyed by method id.
Overrides LanguageNegotiatorInterface::getNegotiationMethods
2 calls to LanguageNegotiator::getNegotiationMethods()
- LanguageNegotiator::saveConfiguration in core/
modules/ language/ src/ LanguageNegotiator.php  - Saves a list of language negotiation methods for a language type.
 - LanguageNegotiator::updateConfiguration in core/
modules/ language/ src/ LanguageNegotiator.php  - Updates the configuration based on the given language types.
 
File
- 
              core/
modules/ language/ src/ LanguageNegotiator.php, line 207  
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;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.