function node_load

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

Loads a node object from the database.

Parameters

$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.

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

... See full list

File

drupal-7.x/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.

Code

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;
}