You are here

function commerce_reset_items_keyed in Commerce Reset 7

Add the callback as the item key.

Return value

array An array of batch.

2 calls to commerce_reset_items_keyed()
commerce_reset_form_commerce_reset_batch_form_alter in ./commerce_reset.module
Implements hook_form_BASE_FORM_ID_alter().
commerce_reset_generate_batch_items in ./commerce_reset.module
Batch generate items.

File

./commerce_reset.helpers.inc, line 107
Contains helper functions for commerce reset.

Code

function commerce_reset_items_keyed() {
  $items = array();
  foreach (commerce_reset_reset_items() as $item) {
    if (is_array($item) and array_key_exists('callback', $item)) {
      $items[$item['callback']] = $item;
    }
  }
  return $items;
}