You are here

protected function LanguageNegotiator::getEnabledNegotiators in Drupal 9

Same name and namespace in other branches
  1. 8 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
Returns the language negotiation methods enabled for a language type.
LanguageNegotiator::getPrimaryNegotiationMethod in core/modules/language/src/LanguageNegotiator.php
Returns the ID of the language type's primary language negotiation method.
LanguageNegotiator::initializeType in core/modules/language/src/LanguageNegotiator.php
Initializes the specified language type.
LanguageNegotiator::isNegotiationMethodEnabled in core/modules/language/src/LanguageNegotiator.php
Checks whether a language negotiation method is enabled for a language type.
LanguageNegotiator::purgeConfiguration in core/modules/language/src/LanguageNegotiator.php
Resave the configuration to purge missing negotiation methods.

File

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

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') ?: [];
}