function LanguageNegotiator::getEnabledNegotiators

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

Gets enabled detection methods for the provided language type.

Parameters

string $type: The language type.

Return value

array An array of enabled detection methods for the provided language type.

5 calls to LanguageNegotiator::getEnabledNegotiators()
LanguageNegotiator::getNegotiationMethods in core/modules/language/src/LanguageNegotiator.php
LanguageNegotiator::getPrimaryNegotiationMethod in core/modules/language/src/LanguageNegotiator.php
LanguageNegotiator::initializeType in core/modules/language/src/LanguageNegotiator.php
LanguageNegotiator::isNegotiationMethodEnabled in core/modules/language/src/LanguageNegotiator.php
LanguageNegotiator::purgeConfiguration in core/modules/language/src/LanguageNegotiator.php

File

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

Class

LanguageNegotiator
Class responsible for performing language negotiation.

Namespace

Drupal\language

Code

protected function getEnabledNegotiators($type) {
    return $this->configFactory
        ->get('language.types')
        ->get('negotiation.' . $type . '.enabled') ?: [];
}

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