You are here

function entity_revision_delete in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/includes/entity.inc \entity_revision_delete()

Deletes an entity revision.

\Drupal::entityManager()
  ->getStorage($entity_type) > deleteRevision($revision_id);

Parameters

string $entity_type: The entity type to load, e.g. node or user.

$revision_id: The revision ID to delete.

Deprecated

as of Drupal 8.0.x, will be removed before Drupal 9.0.0. Use the entity storage's deleteRevision() method to delete a specific entity revision:

See also

\Drupal\Core\Entity\EntityManagerInterface::getStorage()

\Drupal\Core\Entity\EntityStorageInterface::deleteRevision()

2 calls to entity_revision_delete()
EditorFileUsageTest::testEditorEntityHooks in core/modules/editor/src/Tests/EditorFileUsageTest.php
Tests the configurable text editor manager.
node_revision_delete in core/modules/node/node.module
Deletes a node revision.

File

core/includes/entity.inc, line 132
Entity API for handling entities like nodes or users.

Code

function entity_revision_delete($entity_type, $revision_id) {
  \Drupal::entityManager()
    ->getStorage($entity_type)
    ->deleteRevision($revision_id);
}