function LanguageNegotiationInfoTest::isLanguageTypeConfigurable

Same name and namespace in other branches
  1. 9 core/modules/language/tests/src/Functional/LanguageNegotiationInfoTest.php \Drupal\Tests\language\Functional\LanguageNegotiationInfoTest::isLanguageTypeConfigurable()
  2. 10 core/modules/language/tests/src/Functional/LanguageNegotiationInfoTest.php \Drupal\Tests\language\Functional\LanguageNegotiationInfoTest::isLanguageTypeConfigurable()
  3. 11.x core/modules/language/tests/src/Functional/LanguageNegotiationInfoTest.php \Drupal\Tests\language\Functional\LanguageNegotiationInfoTest::isLanguageTypeConfigurable()

Checks whether the given language type is configurable.

Parameters

string $type: The language type.

Return value

bool TRUE if the specified language type is configurable, FALSE otherwise.

1 call to LanguageNegotiationInfoTest::isLanguageTypeConfigurable()
LanguageNegotiationInfoTest::testConfigLangTypeAlterations in core/modules/language/tests/src/Functional/LanguageNegotiationInfoTest.php
Tests altering config of configurable language types.

File

core/modules/language/tests/src/Functional/LanguageNegotiationInfoTest.php, line 211

Class

LanguageNegotiationInfoTest
Tests alterations to language types/negotiation info.

Namespace

Drupal\Tests\language\Functional

Code

protected function isLanguageTypeConfigurable($type) {
    $configurable_types = $this->config('language.types')
        ->get('configurable');
    return in_array($type, $configurable_types);
}

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