3 namespace Drupal\Core\Entity;
6 * Defines a common interface for all content entity objects.
8 * Content entities use fields for all their entity properties and are
9 * translatable and revisionable, while translations and revisions can be
10 * enabled per entity type. It's best practice to always implement
11 * ContentEntityInterface for content-like entities that should be stored in
12 * some database, and enable/disable revisions and translations as desired.
14 * When implementing this interface which extends Traversable, make sure to list
15 * IteratorAggregate or Iterator before this interface in the implements clause.
17 * @see \Drupal\Core\Entity\ContentEntityBase
21 interface ContentEntityInterface extends \Traversable, FieldableEntityInterface, TranslatableRevisionableInterface {
24 * Gets the loaded Revision ID of the entity.
27 * The loaded Revision identifier of the entity, or NULL if the entity
28 * does not have a revision identifier.
30 public function getLoadedRevisionId();
33 * Updates the loaded Revision ID with the revision ID.
35 * This method should not be used, it could unintentionally cause the original
36 * revision ID property value to be lost.
42 public function updateLoadedRevisionId();