Made published field configurable on forms, and made views respect permissions

This commit is contained in:
2021-09-13 14:15:02 +01:00
parent b1a8534d29
commit ac4e6eddd5
6 changed files with 31 additions and 4 deletions

View File

@ -213,11 +213,11 @@ class OCActor extends RevisionableContentEntityBase implements OCActorInterface
public static function baseFieldDefinitions(EntityTypeInterface $entity_type) {
$fields = parent::baseFieldDefinitions($entity_type);
// Currently not using this, but will add form and view settings when ready.
$fields['status'] = BaseFieldDefinition::create('boolean')
->setLabel(t('Publishing status'))
->setDescription(t('Whether this record is published.'))
->setRevisionable(TRUE)
->setDisplayConfigurable("form", true)
->setDefaultValue(TRUE);
// The name gets set on preSave, from the first middle and last