function EntityReferenceFieldTranslatedReferenceViewTest::enableTranslation

Same name in other branches
  1. 9 core/modules/field/tests/src/Functional/EntityReference/EntityReferenceFieldTranslatedReferenceViewTest.php \Drupal\Tests\field\Functional\EntityReference\EntityReferenceFieldTranslatedReferenceViewTest::enableTranslation()
  2. 8.9.x core/modules/field/tests/src/Functional/EntityReference/EntityReferenceFieldTranslatedReferenceViewTest.php \Drupal\Tests\field\Functional\EntityReference\EntityReferenceFieldTranslatedReferenceViewTest::enableTranslation()
  3. 11.x core/modules/field/tests/src/Functional/EntityReference/EntityReferenceFieldTranslatedReferenceViewTest.php \Drupal\Tests\field\Functional\EntityReference\EntityReferenceFieldTranslatedReferenceViewTest::enableTranslation()

Enables translations where it needed.

1 call to EntityReferenceFieldTranslatedReferenceViewTest::enableTranslation()
EntityReferenceFieldTranslatedReferenceViewTest::setUp in core/modules/field/tests/src/Functional/EntityReference/EntityReferenceFieldTranslatedReferenceViewTest.php

File

core/modules/field/tests/src/Functional/EntityReference/EntityReferenceFieldTranslatedReferenceViewTest.php, line 235

Class

EntityReferenceFieldTranslatedReferenceViewTest
Tests the translation of entity reference field display on nodes.

Namespace

Drupal\Tests\field\Functional\EntityReference

Code

protected function enableTranslation() {
    // Enable translation for the entity types.
    $this->enableContentTranslation($this->testEntityTypeName, $this->referrerType
        ->id());
    $this->enableContentTranslation($this->testEntityTypeName, $this->referencedType
        ->id());
}

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