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.

▾ 36 functions call node_load()

batch_example_op_1 in developer/examples/batch_example.module
Batch operation for batch 1 : lode a node...
batch_example_op_2 in developer/examples/batch_example.module
Batch operation for batch 2 : load all nodes, 5 by five This is a multipart operation, using the
book_admin_edit_submit in modules/book/book.admin.inc
Handle submission of the book administrative page form.
book_export_html in modules/book/book.pages.inc
This function is called by book_export() to generate HTML for export.
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.
comment_tokens in modules/comment/comment.tokens.inc
Implement hook_tokens().
file_file_download in modules/file/file.module
Implement hook_file_download().
hook_search_execute in modules/search/search.api.php
Execute a search for a set of key words.
hook_update_index in modules/search/search.api.php
Update Drupal's full-text index for this module.
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_delete_confirm_submit in modules/node/node.pages.inc
Execute node deletion
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().
poll_block_view in modules/poll/poll.module
Implement hook_block_view().
poll_cancel in modules/poll/poll.module
Submit callback for poll_cancel_form().
profile_block_view in modules/profile/profile.module
Implement hook_block_view().
statistics_node_tracker in modules/statistics/statistics.pages.inc
system_tokens in modules/system/system.tokens.inc
Implement hook_tokens().
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_mass_update_helper in modules/node/node.admin.inc
Node Mass Update - helper function.
_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 869

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