You are here

abstract class RevisionableContentEntityBase in Drupal 10

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

Provides a content entity with extended support for revisions.

In addition to the parent entity class, base fields and methods for accessing the revision log message, revision owner and the revision creation time are provided.

Hierarchy

Expanded class hierarchy of RevisionableContentEntityBase

Related topics

1 file declares its use of RevisionableContentEntityBase
EntityTestWithRevisionLog.php in core/modules/system/tests/modules/entity_test_revlog/src/Entity/EntityTestWithRevisionLog.php

File

core/lib/Drupal/Core/Entity/RevisionableContentEntityBase.php, line 14

Namespace

Drupal\Core\Entity
View source
abstract class RevisionableContentEntityBase extends ContentEntityBase implements RevisionLogInterface {
  use RevisionLogEntityTrait;

  /**
   * {@inheritdoc}
   */
  public static function baseFieldDefinitions(EntityTypeInterface $entity_type) {
    $fields = parent::baseFieldDefinitions($entity_type);
    $fields += static::revisionLogBaseFieldDefinitions($entity_type);
    return $fields;
  }

}

Members