ContentEntityInterface.php 934 B

1234567891011121314151617181920212223242526
  1. <?php
  2. namespace Drupal\Core\Entity;
  3. /**
  4. * Defines a common interface for all content entity objects.
  5. *
  6. * Content entities use fields for all their entity properties and can be
  7. * translatable and revisionable. Translations and revisions can be
  8. * enabled per entity type through annotation and using entity type hooks.
  9. *
  10. * It's best practice to always implement ContentEntityInterface for
  11. * content-like entities that should be stored in some database, and
  12. * enable/disable revisions and translations as desired.
  13. *
  14. * When implementing this interface which extends Traversable, make sure to list
  15. * IteratorAggregate or Iterator before this interface in the implements clause.
  16. *
  17. * @see \Drupal\Core\Entity\ContentEntityBase
  18. * @see \Drupal\Core\Entity\EntityTypeInterface
  19. *
  20. * @ingroup entity_api
  21. */
  22. interface ContentEntityInterface extends \Traversable, FieldableEntityInterface, TranslatableRevisionableInterface {
  23. }