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.
\Drupal\node\NodeInterface|null A fully-populated node entity, or NULL if the node is not found.
in Drupal 8.x, will be removed before Drupal 9.0. Use \Drupal\node\Entity\Node::load().
function node_load($nid = NULL, $reset = FALSE) { if ($reset) { \Drupal::entityManager()->getStorage('node')->resetCache(array($nid)); } return Node::load($nid); }
© 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/8.1.x