function node_load_multiple

Loads node entities from the database.

This function should be used whenever you need to load more than one node from the database. Nodes are loaded into memory and will not require database access if loaded again during the same page request.

Parameters

array $nids: (optional) An array of entity IDs. If omitted, all entities are loaded.

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

Return value

array An array of node entities indexed by nid.

See also

entity_load_multiple()

Drupal\Core\Entity\Query\EntityQueryInterface

14 calls to node_load_multiple()
forum_get_topics in drupal/core/modules/forum/forum.module
Gets all the topics in a forum.
Nid::title_query in drupal/core/modules/node/lib/Drupal/node/Plugin/views/argument/Nid.php
Override the behavior of title(). Get the title of the node.
Node::validate_argument in drupal/core/modules/node/lib/Drupal/node/Plugin/views/argument_validator/Node.php
NodeLoadMultipleTest::testNodeMultipleLoad in drupal/core/modules/node/lib/Drupal/node/Tests/NodeLoadMultipleTest.php
Creates four nodes and ensures that they are loaded correctly.
node_admin_nodes in drupal/core/modules/node/node.admin.inc
Returns the admin form object to node_admin_content().

... See full list

File

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

Code

function node_load_multiple(array $nids = NULL, $reset = FALSE) {
  return entity_load_multiple('node', $nids, $reset);
}