EntityDefinitionTestTrait deprecated
trait EntityDefinitionTestTrait (View source)
deprecated
Provides some test methods used to update existing entity definitions.
Methods
Enables a new entity type definition.
Resets the entity type definition.
Updates the 'entity_test_update' entity type to revisionable.
Updates the 'entity_test_update' entity type not revisionable.
Updates the 'entity_test_update' entity type to translatable.
Updates the 'entity_test_update' entity type to not translatable.
Updates the 'entity_test_update' entity type to revisionable and translatable.
Adds a new base field to the 'entity_test_update' entity type.
Adds a long-named base field to the 'entity_test_update' entity type.
Adds a new revisionable base field to the 'entity_test_update' entity type.
Modifies the new base field from 'string' to 'text'.
Promotes a field to an entity key.
Removes the new base field from the 'entity_test_update' entity type.
Adds a single-field index to the base field.
Removes the index added in addBaseFieldIndex().
Adds a new bundle field to the 'entity_test_update' entity type.
Modifies the new bundle field from 'string' to 'text'.
Removes the new bundle field from the 'entity_test_update' entity type.
Adds an index to the 'entity_test_update' entity type's base table.
Removes the index added in addEntityIndex().
Renames the base table to 'entity_test_update_new'.
Renames the data table to 'entity_test_update_data_new'.
Renames the revision table to 'entity_test_update_revision_new'.
Renames the revision data table to 'entity_test_update_revision_data_new'.
Removes the entity type.
Details
protected
enableNewEntityType()
Enables a new entity type definition.
protected
resetEntityType()
Resets the entity type definition.
protected
updateEntityTypeToRevisionable()
Updates the 'entity_test_update' entity type to revisionable.
protected
updateEntityTypeToNotRevisionable()
Updates the 'entity_test_update' entity type not revisionable.
protected
updateEntityTypeToTranslatable()
Updates the 'entity_test_update' entity type to translatable.
protected
updateEntityTypeToNotTranslatable()
Updates the 'entity_test_update' entity type to not translatable.
protected
updateEntityTypeToRevisionableAndTranslatable()
Updates the 'entity_test_update' entity type to revisionable and translatable.
protected
addBaseField(string $type = 'string', string $entity_type_id = 'entity_test_update', bool $is_revisionable = FALSE)
Adds a new base field to the 'entity_test_update' entity type.
protected
addLongNameBaseField()
Adds a long-named base field to the 'entity_test_update' entity type.
protected
addRevisionableBaseField(string $type = 'string')
Adds a new revisionable base field to the 'entity_test_update' entity type.
protected
modifyBaseField()
Modifies the new base field from 'string' to 'text'.
protected
makeBaseFieldEntityKey()
Promotes a field to an entity key.
protected
removeBaseField(string $entity_type_id = 'entity_test_update')
Removes the new base field from the 'entity_test_update' entity type.
protected
addBaseFieldIndex()
Adds a single-field index to the base field.
protected
removeBaseFieldIndex()
Removes the index added in addBaseFieldIndex().
protected
addBundleField(string $type = 'string')
Adds a new bundle field to the 'entity_test_update' entity type.
protected
modifyBundleField()
Modifies the new bundle field from 'string' to 'text'.
protected
removeBundleField()
Removes the new bundle field from the 'entity_test_update' entity type.
protected
addEntityIndex()
Adds an index to the 'entity_test_update' entity type's base table.
protected
removeEntityIndex()
Removes the index added in addEntityIndex().
protected
renameBaseTable()
Renames the base table to 'entity_test_update_new'.
protected
renameDataTable()
Renames the data table to 'entity_test_update_data_new'.
protected
renameRevisionBaseTable()
Renames the revision table to 'entity_test_update_revision_new'.
protected
renameRevisionDataTable()
Renames the revision data table to 'entity_test_update_revision_data_new'.
protected
deleteEntityType()
Removes the entity type.