Same name and namespace in other branches
- 4.6.x modules/node.module \node_revision_delete()
- 4.7.x modules/node.module \node_revision_delete()
- 5.x modules/node/node.module \node_revision_delete()
- 7.x modules/node/node.module \node_revision_delete()
- 8.9.x core/modules/node/node.module \node_revision_delete()
- 9 core/modules/node/node.module \node_revision_delete()
Deletes a node revision.
Parameters
int $revision_id: The revision ID to delete.
Deprecated
in drupal:10.1.0 and is removed from drupal:11.0.0. Use \Drupal\Core\Entity\RevisionableStorageInterface::deleteRevision instead.
See also
https://www.drupal.org/node/3323340
File
- core/
modules/ node/ node.module, line 391 - The core module that allows content to be submitted to the site.
Code
function node_revision_delete($revision_id) {
@trigger_error(__METHOD__ . ' is deprecated in drupal:10.1.0 and is removed from drupal:11.0.0. Use \\Drupal\\Core\\Entity\\RevisionableStorageInterface::deleteRevision instead. See https://www.drupal.org/node/3294237', E_USER_DEPRECATED);
\Drupal::entityTypeManager()
->getStorage('node')
->deleteRevision($revision_id);
}