function node_load

7.x node.module node_load($nid = NULL, $vid = NULL, $reset = FALSE)
5.x node.module node_load($param = array(), $revision = NULL, $reset = NULL)
6.x node.module node_load($param = array(), $revision = NULL, $reset = NULL)
8.x node.module node_load($nid = NULL, $reset = FALSE)

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.

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

... See full list


drupal/modules/node/node.module, line 962
The core that allows content to be submitted to the site. Modules and scripts may programmatically submit nodes using the usual form API pattern.


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