You are here

public static function EditorialContentEntityBase::baseFieldDefinitions in Drupal 10

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Entity/EditorialContentEntityBase.php \Drupal\Core\Entity\EditorialContentEntityBase::baseFieldDefinitions()
  2. 9 core/lib/Drupal/Core/Entity/EditorialContentEntityBase.php \Drupal\Core\Entity\EditorialContentEntityBase::baseFieldDefinitions()
4 methods override EditorialContentEntityBase::baseFieldDefinitions()
BlockContent::baseFieldDefinitions in core/modules/block_content/src/Entity/BlockContent.php
Provides base field definitions for an entity type.
Media::baseFieldDefinitions in core/modules/media/src/Entity/Media.php
Provides base field definitions for an entity type.
MenuLinkContent::baseFieldDefinitions in core/modules/menu_link_content/src/Entity/MenuLinkContent.php
Provides base field definitions for an entity type.
Term::baseFieldDefinitions in core/modules/taxonomy/src/Entity/Term.php
Provides base field definitions for an entity type.

File

core/lib/Drupal/Core/Entity/EditorialContentEntityBase.php, line 19

Class

EditorialContentEntityBase
Provides a base entity class with extended revision and publishing support.

Namespace

Drupal\Core\Entity

Code

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

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

  // Add the published field.
  $fields += static::publishedBaseFieldDefinitions($entity_type);
  return $fields;
}