function node_revision_delete
Same name in other branches
- 7.x modules/node/node.module \node_revision_delete()
- 9 core/modules/node/node.module \node_revision_delete()
- 8.9.x 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
1 call to node_revision_delete()
- NodeDeprecationTest::testNodeRevisionDeleteDeprecation in core/
modules/ node/ tests/ src/ Kernel/ NodeDeprecationTest.php - Tests the deprecation of node_revision_delete.
File
-
core/
modules/ node/ node.module, line 391
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);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.