function EntityDefinitionTestTrait::updateEntityTypeToRevisionableAndTranslatable
Same name in this branch
- 8.9.x core/modules/system/src/Tests/Entity/EntityDefinitionTestTrait.php \Drupal\system\Tests\Entity\EntityDefinitionTestTrait::updateEntityTypeToRevisionableAndTranslatable()
Same name in other branches
- 9 core/modules/system/tests/src/Functional/Entity/Traits/EntityDefinitionTestTrait.php \Drupal\Tests\system\Functional\Entity\Traits\EntityDefinitionTestTrait::updateEntityTypeToRevisionableAndTranslatable()
- 10 core/modules/system/tests/src/Functional/Entity/Traits/EntityDefinitionTestTrait.php \Drupal\Tests\system\Functional\Entity\Traits\EntityDefinitionTestTrait::updateEntityTypeToRevisionableAndTranslatable()
- 11.x core/modules/system/tests/src/Functional/Entity/Traits/EntityDefinitionTestTrait.php \Drupal\Tests\system\Functional\Entity\Traits\EntityDefinitionTestTrait::updateEntityTypeToRevisionableAndTranslatable()
Updates the 'entity_test_update' entity type to revisionable and translatable.
Parameters
bool $perform_update: (optional) Whether the change should be performed by the entity definition update manager.
4 calls to EntityDefinitionTestTrait::updateEntityTypeToRevisionableAndTranslatable()
- EntityUpdateAddRevisionDefaultTest::testAddingTheRevisionDefaultField in core/
modules/ system/ tests/ src/ Functional/ Update/ EntityUpdateAddRevisionDefaultTest.php - Tests the addition of the 'revision_default' base field.
- EntityUpdateAddRevisionTranslationAffectedTest::testAddingTheRevisionTranslationAffectedField in core/
modules/ system/ tests/ src/ Functional/ Update/ EntityUpdateAddRevisionTranslationAffectedTest.php - Tests the addition of the 'revision_translation_affected' base field.
- SqlContentEntityStorageSchemaConverterTestBase::testMakeRevisionable in core/
modules/ system/ tests/ src/ Functional/ Entity/ Update/ SqlContentEntityStorageSchemaConverterTestBase.php - Tests the conversion of an entity type to revisionable.
- ViewsEntitySchemaSubscriberIntegrationTest::testRevisionDataTableRename in core/
modules/ views/ tests/ src/ Kernel/ EventSubscriber/ ViewsEntitySchemaSubscriberIntegrationTest.php - Tests that renaming revision tables adapts the views.
File
-
core/
modules/ system/ tests/ src/ Functional/ Entity/ Traits/ EntityDefinitionTestTrait.php, line 210
Class
- EntityDefinitionTestTrait
- Provides some test methods used to update existing entity definitions.
Namespace
Drupal\Tests\system\Functional\Entity\TraitsCode
protected function updateEntityTypeToRevisionableAndTranslatable($perform_update = FALSE) {
$updated_entity_type = $this->getUpdatedEntityTypeDefinition(TRUE, TRUE);
$updated_field_storage_definitions = $this->getUpdatedFieldStorageDefinitions(TRUE, TRUE);
if ($perform_update) {
$this->entityDefinitionUpdateManager
->updateFieldableEntityType($updated_entity_type, $updated_field_storage_definitions);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.