You are here

abstract class EditorialContentEntityBase in Drupal 10

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Entity/EditorialContentEntityBase.php \Drupal\Core\Entity\EditorialContentEntityBase
  2. 9 core/lib/Drupal/Core/Entity/EditorialContentEntityBase.php \Drupal\Core\Entity\EditorialContentEntityBase

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

Hierarchy

Expanded class hierarchy of EditorialContentEntityBase

Related topics

5 files declare their use of EditorialContentEntityBase
BlockContent.php in core/modules/block_content/src/Entity/BlockContent.php
Media.php in core/modules/media/src/Entity/Media.php
MenuLinkContent.php in core/modules/menu_link_content/src/Entity/MenuLinkContent.php
Node.php in core/modules/node/src/Entity/Node.php
Term.php in core/modules/taxonomy/src/Entity/Term.php

File

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

Namespace

Drupal\Core\Entity
View source
abstract class EditorialContentEntityBase extends ContentEntityBase implements EntityChangedInterface, EntityPublishedInterface, RevisionLogInterface {
  use EntityChangedTrait;
  use EntityPublishedTrait;
  use RevisionLogEntityTrait;

  /**
   * {@inheritdoc}
   */
  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;
  }

}

Members