You are here

function library_get_transactions_by_node in Library 7

Same name and namespace in other branches
  1. 5.2 library.module \library_get_transactions_by_node()
  2. 6.2 library.module \library_get_transactions_by_node()
  3. 6 library.module \library_get_transactions_by_node()

Retrieves all transactions for all items on a node.

Parameters

object $node: A node object.

Return value

null|array Array of transaction objects for a node if present.

1 call to library_get_transactions_by_node()
library_history in ./library.pages.inc
A menu callback to show the transaction history of a single node.

File

./library.module, line 910

Code

function library_get_transactions_by_node($node) {
  $transactions = NULL;
  if ($node->library_items) {
    $select = library_get_transactions_query();
    $select
      ->condition('lt.nid', $node->nid);
    $transactions = $select
      ->execute()
      ->fetchAll();
  }
  return $transactions;
}