node_load

  1. drupal
    1. 5
    2. 6
    3. 7
    4. 8
Versions
5 – 6 node_load($param = array(), $revision = NULL, $reset = NULL)
8 – 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.

▾ 79 functions call node_load()

batch_example_op_1 in examples/batch_example/batch_example.module
Batch operation for batch 1: load a node. This is the function that is called on each operation in batch 1.
batch_example_op_2 in examples/batch_example/batch_example.module
Batch operation for batch 2 : load all nodes, 5 by five After each group of 5 control is returned to the batch API for later continuation.
book_admin_edit_submit in modules/book/book.admin.inc
Handle submission of the book administrative page form.
book_block_view in modules/book/book.module
Implements hook_block_view().
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
Implements hook_node_delete().
CommentInterfaceTest::testCommentNodeCommentStatistics in modules/comment/comment.test
Tests the node comment statistics.
CommentPagerTest::testCommentNewPageIndicator in modules/comment/comment.test
Test comment_new_page_count().
CommentTokenReplaceTestCase::testCommentTokenReplacement in modules/comment/comment.test
Creates a comment, then tests the tokens generated from it.
comment_edit_page in modules/comment/comment.module
Page callback for comment editing.
comment_file_download_access in modules/comment/comment.module
Implements hook_file_download_access().
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_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
Implements hook_tokens().
EntityCrudHookTestCase::testNodeHooks in modules/simpletest/tests/entity_crud_hook_test.test
Test hook invocations for CRUD operations on nodes.
FileFieldDisplayTestCase::testNodeDisplay in modules/file/tests/file.test
Test normal formatter display on node display.
FileFieldPathTestCase::testUploadPath in modules/file/tests/file.test
Test normal formatter display on node display.
FileFieldRevisionTestCase::testRevisions in modules/file/tests/file.test
Test creating multiple revisions of a node and managing the attached files.
FileFieldTestCase::uploadNodeFile in modules/file/tests/file.test
Upload a file to a node.
FileFieldValidateTestCase::testFileExtension in modules/file/tests/file.test
Test the file extension, do additional checks if mimedetect is installed.
FileFieldValidateTestCase::testFileMaxSize in modules/file/tests/file.test
Test the max file size validator.
FileFieldValidateTestCase::testRequired in modules/file/tests/file.test
Test required property on file fields.
FileFieldWidgetTestCase::testMultiValuedWidget in modules/file/tests/file.test
Tests upload and remove buttons, with and without Ajax, for multiple multi-valued File field.
FileFieldWidgetTestCase::testPrivateFileSetting in modules/file/tests/file.test
Tests a file field with a "Private files" upload destination setting.
FileFieldWidgetTestCase::testSingleValuedWidget in modules/file/tests/file.test
Tests upload and remove buttons, with and without Ajax, for a single-valued File field.
FilePrivateTestCase::testPrivateFile in modules/file/tests/file.test
Uploads a file to a private node, then tests that access is allowed and denied when appropriate.
FileTokenReplaceTestCase::testFileTokenReplacement in modules/file/tests/file.test
Creates a file, then tests the tokens generated from it.
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 the search index for this module.
ImageAdminStylesUnitTest::testStyleReplacement in modules/image/image.test
Test deleting a style and choosing a replacement style.
ImageFieldDisplayTestCase::testImageFieldDefaultImage in modules/image/image.test
Test use of a default image with an image field.
ImageFieldDisplayTestCase::testImageFieldSettings in modules/image/image.test
Tests for image field settings.
ImageFieldDisplayTestCase::_testImageFieldFormatters in modules/image/image.test
Test image formatters on node display.
MenuTestCase::testMenu in modules/menu/menu.test
Login users, add menus and menu links, and test menu functionality through the admin and user interfaces.
NodeAccessRecordsUnitTest::testNodeAccessRecords in modules/node/node.test
Create a node and test the creation of node access rules.
NodeBodyUpgradePathTestCase::testNodeBodyUpgrade in modules/simpletest/tests/upgrade/upgrade.node.test
Test a successful upgrade.
NodeRevisionsTestCase::setUp in modules/node/node.test
Generates a random database prefix, runs the install scripts on the prefixed database and enable the specified modules. After installation many caches are flushed and the internal browser is setup so that the page requests will run on the new prefix.…
NodeRevisionsTestCase::testNodeRevisionWithoutLogMessage in modules/node/node.test
Checks that revisions are correctly saved without log messages.
NodeRevisionsTestCase::testRevisions in modules/node/node.test
Check node revision related operations.
NodeSaveTestCase::testDeterminingChanges in modules/node/node.test
Tests determing changes in hook_node_presave() and verifies the static node load cache is cleared upon save.
NodeSaveTestCase::testImport in modules/node/node.test
Import test, to check if custom node ids are saved properly. Workflow:
NodeTokenReplaceTestCase::testNodeTokenReplacement in modules/node/node.test
Creates a node, then tests the tokens generated from it.
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_example_page in examples/node_example/node_example.module
Callback that builds our content and returns it to the browser.
node_help in modules/node/node.module
Implements hook_help().
node_revision_delete in modules/node/node.module
Delete a node revision.
node_search_execute in modules/node/node.module
Implements hook_search_execute().
PageEditTestCase::testPageAuthoredBy in modules/node/node.test
Check changing node authored by fields.
PageEditTestCase::testPageEdit in modules/node/node.test
Check node edit functionality.
PageViewTestCase::testPageView in modules/node/node.test
Creates a node and then an anonymous and unpermissioned user attempt to edit the node.
PollCreateTestCase::testPollCreate in modules/poll/poll.test
PollTokenReplaceTestCase::testPollTokenReplacement in modules/poll/poll.test
Creates a poll, then tests the tokens generated from it.
poll_block_view in modules/poll/poll.module
Implements hook_block_view().
poll_cancel in modules/poll/poll.module
Submit callback for poll_cancel_form().
profile_block_view in modules/profile/profile.module
Implements hook_block_view().
statistics_node_tracker in modules/statistics/statistics.pages.inc
SummaryLengthTestCase::testSummaryLength in modules/node/node.test
Creates a node and then an anonymous and unpermissioned user attempt to edit the node.
translation_language_switch_links_alter in modules/translation/translation.module
Implements hook_language_switch_links_alter().
translation_node_overview in modules/translation/translation.pages.inc
Overview page for a node's translations.
translation_node_prepare in modules/translation/translation.module
Implements 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.
UpgradePathTaxonomyTestCase::testTaxonomyUpgrade in modules/simpletest/tests/upgrade/upgrade.taxonomy.test
Basic tests for the taxonomy upgrade.
UploadUpgradePathTestCase::testUploadUpgrade in modules/simpletest/tests/upgrade/upgrade.upload.test
Test a successful upgrade.
UserCancelTestCase::testUserAnonymize in modules/user/user.test
Delete account and anonymize all content.
UserCancelTestCase::testUserBlockUnpublish in modules/user/user.test
Disable account and unpublish all content.
UserCancelTestCase::testUserCancelInvalid in modules/user/user.test
Attempt invalid account cancellations.
UserCancelTestCase::testUserCancelWithoutPermission in modules/user/user.test
Attempt to cancel account without permission.
UserCancelTestCase::testUserDelete in modules/user/user.test
Delete account and remove all content.
_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 924

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