protected function ContentTranslationTestBase::enableTranslation in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/content_translation/src/Tests/ContentTranslationTestBase.php \Drupal\content_translation\Tests\ContentTranslationTestBase::enableTranslation()
Enables translation for the current entity type and bundle.
1 call to ContentTranslationTestBase::enableTranslation()
- ContentTranslationTestBase::setUp in core/
modules/ content_translation/ src/ Tests/ ContentTranslationTestBase.php - Sets up a Drupal site for running functional and integration tests.
File
- core/
modules/ content_translation/ src/ Tests/ ContentTranslationTestBase.php, line 169 - Contains \Drupal\content_translation\Tests\ContentTranslationTestBase.
Class
- ContentTranslationTestBase
- Base class for content translation tests.
Namespace
Drupal\content_translation\TestsCode
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);
drupal_static_reset();
\Drupal::entityManager()
->clearCachedDefinitions();
\Drupal::service('router.builder')
->rebuild();
\Drupal::service('entity.definition_update_manager')
->applyUpdates();
}