function node_load

Same name and namespace in other branches
  1. 8.9.x core/modules/node/node.module \node_load()

Loads a node object from the database.


$nid: The node ID.

$vid: The revision ID.

$reset: Whether to reset the node_load_multiple cache.

Return value

A fully-populated node object, or FALSE if the node is not found.

89 calls to node_load()
BookTestCase::testBookDelete in modules/book/book.test
Tests the access for deleting top-level book nodes.
book_admin_edit_submit in modules/book/
Form submission handler for book_admin_edit().
book_block_view in modules/book/book.module
Implements hook_block_view().
book_export in modules/book/
Menu callback; Generates representations of a book page and its children.
book_export_html in modules/book/
Generates HTML for export when invoked by book_export().

... See full list


modules/node/node.module, line 963


function node_load($nid = NULL, $vid = NULL, $reset = FALSE) {
    $nids = isset($nid) ? array(
    ) : array();
    $conditions = isset($vid) ? array(
        'vid' => $vid,
    ) : array();
    $node = node_load_multiple($nids, $conditions, $reset);
    return $node ? reset($node) : FALSE;

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