node_load_multiple(array $nids = NULL, $reset = FALSE)
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.
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.
\Drupal\node\NodeInterface[] An array of node entities indexed by nid.
in Drupal 8.x, will be removed before Drupal 9.0. Use \Drupal\node\Entity\Node::loadMultiple().
\Drupal\Core\Entity\Query\EntityQueryInterface
function node_load_multiple(array $nids = NULL, $reset = FALSE) { if ($reset) { \Drupal::entityManager()->getStorage('node')->resetCache($nids); } return Node::loadMultiple($nids); }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!modules!node!node.module/function/node_load_multiple/8.1.x