_node_resource_retrieve

  1. services
    1. 7.3
    2. 7 node_resource.inc
    3. 6.2 node_resource.inc
    4. 6.3
Versions
6.3 – 7.3 _node_resource_retrieve($nid)

Returns the results of a node_load() for the specified node.

This returned node may optionally take content_permissions settings into account, based on a configuration setting.

Parameters

$nid NID of the node we want to return.

Return value

Node object or FALSE if not found.

See also

node_load()

Code

resources/node_resource.inc, line 201

<?php
function _node_resource_retrieve($nid) {
  $node = node_load($nid);

  if ($node) {
    $uri = entity_uri('node', $node);
    $node->path = url($uri['path'], array('absolute' => TRUE));
    // Unset uri as it has complete entity and this
    // cause never ending recursion in rendering.
    unset($node->uri);
  }
  return $node;
}
?>