Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / lib / Drupal / Core / Entity / RevisionableInterface.php
index 0fc6db2fec9359a310bc6bf3d9bff5da58a42174..ee53e398f054a9952b215116454d3b825892ccfa 100644 (file)
@@ -4,6 +4,21 @@ namespace Drupal\Core\Entity;
 
 /**
  * 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 {
 
@@ -39,6 +54,27 @@ 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.
    *