function EntityRepositoryTest::getLanguageContexts

Same name and namespace in other branches
  1. 11.x core/tests/Drupal/KernelTests/Core/Entity/EntityRepositoryTest.php \Drupal\KernelTests\Core\Entity\EntityRepositoryTest::getLanguageContexts()
  2. 10 core/tests/Drupal/KernelTests/Core/Entity/EntityRepositoryTest.php \Drupal\KernelTests\Core\Entity\EntityRepositoryTest::getLanguageContexts()
  3. 9 core/tests/Drupal/KernelTests/Core/Entity/EntityRepositoryTest.php \Drupal\KernelTests\Core\Entity\EntityRepositoryTest::getLanguageContexts()
  4. 8.9.x core/tests/Drupal/KernelTests/Core/Entity/EntityRepositoryTest.php \Drupal\KernelTests\Core\Entity\EntityRepositoryTest::getLanguageContexts()

Returns a set of language contexts matching the specified language.

Parameters

string $langcode: A language code.

Return value

\Drupal\Core\Plugin\Context\ContextInterface[] An array of contexts.

File

core/tests/Drupal/KernelTests/Core/Entity/EntityRepositoryTest.php, line 322

Class

EntityRepositoryTest
Tests the entity repository.

Namespace

Drupal\KernelTests\Core\Entity

Code

protected function getLanguageContexts($langcode) : array {
  return [
    'langcode' => $langcode,
  ];
}

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