function node_revision_delete

Same name in other branches
  1. 7.x modules/node/node.module \node_revision_delete()
  2. 8.9.x core/modules/node/node.module \node_revision_delete()
  3. 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 359

Code

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

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