You are here

function merci_load in MERCI (Manage Equipment Reservations, Checkout and Inventory) 7.2

Same name and namespace in other branches
  1. 6.2 merci.module \merci_load()
  2. 6 merci.module \merci_load()

Implements hook_load().

File

./merci.module, line 877
MERCI - Managed Equipment Reservation Checkout and Inventory

Code

function merci_load($nodes) {
  foreach ($nodes as $nid => &$node) {
    $return = new stdClass();
    $return->merci_reservation_status = merci_reservation_status($node);

    // TODO get rid of merci array.  should match form api post fields.
    $return->merci_reservation_items = merci_reservation_items($node);
    foreach ($return as $property => &$value) {
      $node->{$property} = $value;
    }
  }
}