interface RevisionableStorageInterface
Same name and namespace in other branches
- 11.x core/lib/Drupal/Core/Entity/RevisionableStorageInterface.php \Drupal\Core\Entity\RevisionableStorageInterface
- 10 core/lib/Drupal/Core/Entity/RevisionableStorageInterface.php \Drupal\Core\Entity\RevisionableStorageInterface
- 8.9.x core/lib/Drupal/Core/Entity/RevisionableStorageInterface.php \Drupal\Core\Entity\RevisionableStorageInterface
A storage that supports revisionable entity types.
Hierarchy
- interface \Drupal\Core\Entity\EntityStorageInterface
- interface \Drupal\Core\Entity\RevisionableStorageInterface extends \Drupal\Core\Entity\EntityStorageInterface
Expanded class hierarchy of RevisionableStorageInterface
All classes that implement RevisionableStorageInterface
1 file declares its use of RevisionableStorageInterface
- EntityResource.php in core/
modules/ jsonapi/ src/ Controller/ EntityResource.php
File
-
core/
lib/ Drupal/ Core/ Entity/ RevisionableStorageInterface.php, line 8
Namespace
Drupal\Core\EntityView source
interface RevisionableStorageInterface extends EntityStorageInterface {
/**
* Creates a new revision starting off from the specified entity object.
*
* @param \Drupal\Core\Entity\RevisionableInterface $entity
* The revisionable entity object being modified.
* @param bool $default
* (optional) Whether the new revision should be marked as default. Defaults
* to TRUE.
*
* @return \Drupal\Core\Entity\RevisionableInterface
* A new entity revision object.
*/
public function createRevision(RevisionableInterface $entity, $default = TRUE);
/**
* Loads a specific entity revision.
*
* @param int $revision_id
* The revision ID.
*
* @return \Drupal\Core\Entity\RevisionableInterface|null
* The specified entity revision or NULL if not found.
*/
public function loadRevision($revision_id);
/**
* Loads multiple entity revisions.
*
* @param array $revision_ids
* An array of revision IDs to load.
*
* @return \Drupal\Core\Entity\RevisionableInterface[]
* An array of entity revisions keyed by their revision ID, or an empty
* array if none found.
*/
public function loadMultipleRevisions(array $revision_ids);
/**
* Deletes a specific entity revision.
*
* A revision can only be deleted if it's not the currently active one.
*
* @param int $revision_id
* The revision ID.
*/
public function deleteRevision($revision_id);
/**
* Returns the latest revision identifier for an entity.
*
* @param int|string $entity_id
* The entity identifier.
*
* @return int|string|null
* The latest revision identifier or NULL if no revision could be found.
*/
public function getLatestRevisionId($entity_id);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.