/**
* Provides methods for an entity to support revisions.
+ *
+ * Classes implementing this interface do not necessarily support revisions.
+ *
+ * To detect whether an entity type supports revisions, call
+ * EntityTypeInterface::isRevisionable().
+ *
+ * Many entity interfaces are composed of numerous other interfaces such as this
+ * one, which allow implementations to pick and choose which features to.
+ * support through stub implementations of various interface methods. This means
+ * that even if an entity class implements RevisionableInterface, it might only
+ * have a stub implementation and not a functional one.
+ *
+ * @see \Drupal\Core\Entity\EntityTypeInterface::isRevisionable()
+ * @see https://www.drupal.org/docs/8/api/entity-api/structure-of-an-entity-annotation
+ * @see https://www.drupal.org/docs/8/api/entity-api/making-an-entity-revisionable
*/
interface RevisionableInterface {
*/
public function getRevisionId();
+ /**
+ * Gets the loaded Revision ID of the entity.
+ *
+ * @return int
+ * The loaded Revision identifier of the entity, or NULL if the entity
+ * does not have a revision identifier.
+ */
+ public function getLoadedRevisionId();
+
+ /**
+ * Updates the loaded Revision ID with the revision ID.
+ *
+ * This method should not be used, it could unintentionally cause the original
+ * revision ID property value to be lost.
+ *
+ * @internal
+ *
+ * @return $this
+ */
+ public function updateLoadedRevisionId();
+
/**
* Checks if this entity is the default revision.
*