1 node_test.module node_test_node_load($nodes, $types)

Implements hook_node_load().

File

core/modules/node/tests/node_test/node_test.module, line 13
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;
  }
}