You are here

function node_revision_delete in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/node/node.module \node_revision_delete()
  2. 4 modules/node.module \node_revision_delete()
  3. 5 modules/node/node.module \node_revision_delete()
  4. 7 modules/node/node.module \node_revision_delete()
  5. 9 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 359
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);
}