function node_revision_load
Same name in other branches
- 9 core/modules/node/node.module \node_revision_load()
- 10 core/modules/node/node.module \node_revision_load()
Loads a node revision from the database.
Parameters
int $vid: The node revision id.
Return value
\Drupal\node\NodeInterface|null A fully-populated node entity, or NULL if the node is not found.
7 calls to node_revision_load()
- FileFieldRevisionTest::testRevisions in core/
modules/ file/ tests/ src/ Functional/ FileFieldRevisionTest.php - Tests creating multiple revisions of a node and managing attached files.
- NodeEditFormTest::testNodeEdit in core/
modules/ node/ tests/ src/ Functional/ NodeEditFormTest.php - Checks node edit functionality.
- NodeRevisionsAllTest::testRevisions in core/
modules/ node/ tests/ src/ Functional/ NodeRevisionsAllTest.php - Checks node revision operations.
- NodeRevisionsTest::testRevisions in core/
modules/ node/ tests/ src/ Functional/ NodeRevisionsTest.php - Checks node revision related operations.
- UserCancelTest::testUserAnonymize in core/
modules/ user/ tests/ src/ Functional/ UserCancelTest.php - Delete account and anonymize all content.
File
-
core/
modules/ node/ node.module, line 501
Code
function node_revision_load($vid = NULL) {
return \Drupal::entityTypeManager()->getStorage('node')
->loadRevision($vid);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.