class ContentModerationState extends ContentEntityBase
implements ContentModerationStateInterface
{ use EntityOwnerTrait;
/**
* {@inheritdoc}
*/
public static function baseFieldDefinitions(EntityTypeInterface
$entity_type) { $fields = parent::
baseFieldDefinitions($entity_type);
$fields +=
static::
ownerBaseFieldDefinitions($entity_type);
$fields['uid'
] ->
setLabel(t('User'
)) ->
setDescription(t('The username of the entity creator.'
)) ->
setRevisionable(TRUE
);
$fields['workflow'
] = BaseFieldDefinition::
create('entity_reference'
) ->
setLabel(t('Workflow'
)) ->
setDescription(t('The workflow the moderation state is in.'
)) ->
setSetting('target_type', 'workflow'
) ->
setRequired(TRUE
)