RevisionableContentEntityBase.php 720 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. namespace Drupal\Core\Entity;
  3. /**
  4. * Provides a content entity with extended support for revisions.
  5. *
  6. * In addition to the parent entity class, base fields and methods for
  7. * accessing the revision log message, revision owner and the revision creation
  8. * time are provided.
  9. *
  10. * @ingroup entity_api
  11. */
  12. abstract class RevisionableContentEntityBase extends ContentEntityBase implements RevisionLogInterface {
  13. use RevisionLogEntityTrait;
  14. /**
  15. * {@inheritdoc}
  16. */
  17. public static function baseFieldDefinitions(EntityTypeInterface $entity_type) {
  18. $fields = parent::baseFieldDefinitions($entity_type);
  19. $fields += static::revisionLogBaseFieldDefinitions($entity_type);
  20. return $fields;
  21. }
  22. }