You are here

function node_test_node_load in Drupal 7

Implements hook_node_load().

File

modules/node/tests/node_test.module, line 14
A dummy module for testing node related hooks.

Code

function node_test_node_load($nodes, $types) {

  // Add properties to each loaded node which record the parameters that were
  // passed in to this function, so the tests can check that (a) this hook was
  // called, and (b) the parameters were what we expected them to be.
  $nids = array_keys($nodes);
  ksort($nids);
  sort($types);
  foreach ($nodes as $node) {
    $node->node_test_loaded_nids = $nids;
    $node->node_test_loaded_types = $types;
  }
}