You are here

public static function WorkableItemWithRevision::baseFieldDefinitions in Drupal PM (Project Management) 4.x

Returns an array of base field definitions for publishing status.

Parameters

\Drupal\Core\Entity\EntityTypeInterface $entity_type: The entity type to add the publishing status field to.

Return value

\Drupal\Core\Field\BaseFieldDefinition[] An array of base field definitions.

Throws

\Drupal\Core\Entity\Exception\UnsupportedEntityTypeDefinitionException Thrown when the entity type does not implement EntityPublishedInterface or if it does not have a "published" entity key.

Overrides WorkableItem::baseFieldDefinitions

File

modules/pm_project/src/Entity/WorkableItemWithRevision.php, line 20

Class

WorkableItemWithRevision
Provides Workable Item with Revisions.

Namespace

Drupal\pm_project\Entity

Code

public static function baseFieldDefinitions(EntityTypeInterface $entity_type) {
  $fields = parent::baseFieldDefinitions($entity_type);

  // Add the revision metadata fields.
  $fields += static::revisionLogBaseFieldDefinitions($entity_type);
  return $fields;
}