// Add a non-revisionable bundle field to test revision field table
// handling.
$this->
addBundleField('string', FALSE, TRUE
);
// The 'changed' field type has a special behavior because it updates itself
// automatically if any of the other field values of an entity have been
// updated, so add it to the entity type that is being tested in order to
// provide test coverage for this special case.
$fields['changed'
] = BaseFieldDefinition::
create('changed'
) ->
setLabel(t('Changed'
)) ->
setDescription(t('The time that the content block was last edited.'
)) ->
setTranslatable(TRUE
) ->
setRevisionable(TRUE
);
$this->state->
set('entity_test_update.additional_base_field_definitions',
$fields);
$this->
installEntitySchema($this->entityTypeId
);
// Enable an additional language.
ConfigurableLanguage::
createFromLangcode('ro'
)->
save();
// Force the update function to convert one entity at a time.
$settings = Settings::
getAll();