You are here

function commerce_gc_transaction_statuses in Commerce GC 7

Get a list of all transaction status info or info about a particular status.

2 calls to commerce_gc_transaction_statuses()
commerce_gc_balance_total_statuses in ./commerce_gc.module
Get all statuses in a particular state
commerce_gc_transaction_status_option_list in ./commerce_gc.module
Get a list of transaction status options

File

./commerce_gc.module, line 94
Provides Giftcard coupon bundle, Giftcard Transaction entity and basic user interface elements.

Code

function commerce_gc_transaction_statuses($name = FALSE) {
  $cache =& drupal_static(__FUNCTION__);
  if (!$cache) {
    $statuses = module_invoke_all('commerce_gc_transaction_status_info');
    foreach ($statuses as $machine_name => $status) {
      $cache[$machine_name] = $status + array(
        'machine_name' => $machine_name,
      );
    }
  }
  return isset($cache[$name]) ? $cache[$name] : $cache;
}