Implements Drupal\Core\Entity\EntityStorageControllerInterface::deleteRevision().
Overrides EntityStorageControllerInterface::deleteRevision
public function deleteRevision($revision_id) {
if ($revision = $this
->loadRevision($revision_id)) {
// Prevent deletion if this is the default revision.
if ($revision
->isDefaultRevision()) {
throw new EntityStorageException('Default revision can not be deleted');
}
db_delete($this->revisionTable)
->condition($this->revisionKey, $revision
->getRevisionId())
->execute();
$this
->invokeHook('revision_delete', $revision);
}
}