function library_get_transactions_by_item in Library 7
Same name and namespace in other branches
- 5.2 library.module \library_get_transactions_by_item()
- 6.2 library.module \library_get_transactions_by_item()
- 6 library.module \library_get_transactions_by_item()
Retrieves all transactions for an item.
Parameters
object $item: An item object.
Return value
null|array Array of transaction objects for an item if present.
1 call to library_get_transactions_by_item()
- library_get_last_transaction_by_item in ./
library.module - Retrieve last transaction for an item.
File
- ./
library.module, line 889
Code
function library_get_transactions_by_item($item) {
$select = library_get_transactions_query();
$select
->condition('lt.item_id', $item->id);
$transactions = $select
->execute()
->fetchAll();
if ($transactions) {
return $transactions;
}
else {
return NULL;
}
}