node_load

Versions
4.6
node_load($conditions, $revision = NULL, $reset = NULL)
4.7 – 6
node_load($param = array(), $revision = NULL, $reset = NULL)
7
node_load($nid = NULL, $vid = NULL, $reset = FALSE)

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

▾ 21 functions call node_load()

book_export_traverse in modules/book/book.module
Traverse the book tree to build printable or exportable output.
book_form_node_delete_confirm_alter in modules/book/book.module
Form altering function for the confirm form for a single node deletion.
book_node_delete in modules/book/book.module
Implement hook_node_delete().
comment_form in modules/comment/comment.module
Generate the basic commenting form, for appending to a node or display on a separate page.
comment_form_submit in modules/comment/comment.module
Process comment form submissions; prepare the comment, store it, and set a redirection target.
comment_form_validate in modules/comment/comment.module
Validate comment form submissions.
comment_permalink in modules/comment/comment.module
Redirects comment links to the correct page depending on comment settings.
comment_preview in modules/comment/comment.module
Generate a comment preview.
comment_save in modules/comment/comment.module
Accepts a submission of new or changed comment content.
node_access_rebuild in modules/node/node.module
Rebuild the node access database. This is occasionally needed by modules that make system-wide changes to access levels.
node_help in modules/node/node.module
Implement hook_help().
node_revision_delete in modules/node/node.module
Delete a node revision.
node_search_execute in modules/node/node.module
Implement hook_search_execute().
translation_node_overview in modules/translation/translation.pages.inc
Overview page for a node's translations.
translation_node_prepare in modules/translation/translation.module
Implement hook_node_prepare().
translation_path_get_translations in modules/translation/translation.module
Return paths of all translations of a node, based on its Drupal path.
upload_file_download in modules/upload/upload.module
Implement hook_file_download().
_node_index_node in modules/node/node.module
Index a single node.
_node_revision_access in modules/node/node.module
_trigger_normalize_comment_context in modules/trigger/trigger.module
Loads associated objects for comment triggers.
_trigger_normalize_user_context in modules/trigger/trigger.module
Loads associated objects for user triggers.

Code

modules/node/node.module, line 861

<?php
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;
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.