entity_revision_delete($entity_type, $revision_id)
Deletes an entity revision.
\Drupal::entityTypeManager() ->getStorage($entity_type) ->deleteRevision($revision_id);
string $entity_type: The entity type to load, e.g. node or user.
$revision_id: The revision ID to delete.
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:
\Drupal\Core\Entity\EntityTypeManagerInterface::getStorage()
\Drupal\Core\Entity\EntityStorageInterface::deleteRevision()
function entity_revision_delete($entity_type, $revision_id) { \Drupal::entityManager() ->getStorage($entity_type) ->deleteRevision($revision_id); }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!includes!entity.inc/function/entity_revision_delete/8.1.x