You are here

function node_revision_delete in Drupal 8

Same name and namespace in other branches
  1. 4 modules/node.module \node_revision_delete()
  2. 5 modules/node/node.module \node_revision_delete()
  3. 7 modules/node/node.module \node_revision_delete()
  4. 9 core/modules/node/node.module \node_revision_delete()
  5. 10 core/modules/node/node.module \node_revision_delete()

Deletes a node revision.

Parameters

int $revision_id: The revision ID to delete.

1 call to node_revision_delete()
node_user_predelete in core/modules/node/node.module
Implements hook_ENTITY_TYPE_predelete() for user entities.

File

core/modules/node/node.module, line 511
The core module that allows content to be submitted to the site.

Code

function node_revision_delete($revision_id) {
  \Drupal::entityTypeManager()
    ->getStorage('node')
    ->deleteRevision($revision_id);
}