function ContentTranslationTestBase::enableTranslation
Same name in other branches
- 9 core/modules/content_translation/tests/src/Functional/ContentTranslationTestBase.php \Drupal\Tests\content_translation\Functional\ContentTranslationTestBase::enableTranslation()
- 8.9.x core/modules/content_translation/src/Tests/ContentTranslationTestBase.php \Drupal\content_translation\Tests\ContentTranslationTestBase::enableTranslation()
- 8.9.x core/modules/content_translation/tests/src/Functional/ContentTranslationTestBase.php \Drupal\Tests\content_translation\Functional\ContentTranslationTestBase::enableTranslation()
- 10 core/modules/content_translation/tests/src/Functional/ContentTranslationTestBase.php \Drupal\Tests\content_translation\Functional\ContentTranslationTestBase::enableTranslation()
Enables translation for the current entity type and bundle.
1 call to ContentTranslationTestBase::enableTranslation()
- ContentTranslationTestBase::doSetup in core/
modules/ content_translation/ tests/ src/ Functional/ ContentTranslationTestBase.php - Completes preparation for content translation tests.
File
-
core/
modules/ content_translation/ tests/ src/ Functional/ ContentTranslationTestBase.php, line 168
Class
- ContentTranslationTestBase
- Base class for content translation tests.
Namespace
Drupal\Tests\content_translation\FunctionalCode
protected function enableTranslation() {
// Enable translation for the current entity type and ensure the change is
// picked up.
\Drupal::service('content_translation.manager')->setEnabled($this->entityTypeId, $this->bundle, TRUE);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.