function entity_revision_delete

Deletes an entity revision.

Parameters

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

$revision_id: The revision ID to delete.

Deprecated

in drupal:8.0.0 and is removed from drupal:9.0.0. Use the entity type storage's deleteRevision() method.

See also

https://www.drupal.org/node/1818376

1 call to entity_revision_delete()
EntityLegacyTest::testEntityLegacyCode in core/tests/Drupal/KernelTests/Core/Entity/EntityLegacyTest.php
@expectedDeprecation entity_load_multiple() is deprecated in Drupal 8.0.0 and will be removed before Drupal 9.0.0. Use the entity type storage's loadMultiple() method. See https://www.drupal.org/node/2266845 @expectedDeprecation entity_load() is…

File

core/includes/entity.inc, line 125

Code

function entity_revision_delete($entity_type, $revision_id) {
    @trigger_error('entity_revision_delete() is deprecated in Drupal 8.0.0 and will be removed before Drupal 9.0.0. Use the entity type storage\'s deleteRevision() method. See https://www.drupal.org/node/1818376', E_USER_DEPRECATED);
    \Drupal::entityManager()->getStorage($entity_type)
        ->deleteRevision($revision_id);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.