function node_load

You are here

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

Loads a node entity from the database.


int $nid: The node ID.

bool $reset: (optional) Whether to reset the node_load_multiple() cache. Defaults to FALSE.

Return value

\Drupal\node\NodeInterface|null A fully-populated node entity, or NULL if the node is not found.

60 calls to node_load()
BookNavigationBlock::build in core/modules/book/lib/Drupal/book/Plugin/Block/BookNavigationBlock.php
Builds and returns the renderable array for this block plugin.
BookTest::testBookDelete in core/modules/book/lib/Drupal/book/Tests/BookTest.php
Tests the access for deleting top-level book nodes.
book_form_node_delete_confirm_alter in core/modules/book/book.module
Implements hook_form_FORM_ID_alter() for node_delete_confirm().
BulkFormTest::testBulkForm in core/modules/action/lib/Drupal/action/Tests/BulkFormTest.php
Tests the bulk form.
callback_batch_operation in core/modules/system/form.api.php
Perform a single batch operation.

... See full list


core/modules/node/node.module, line 535
The core module that allows content to be submitted to the site.


function node_load($nid = NULL, $reset = FALSE) {
  return entity_load('node', $nid, $reset);