You are here

function _checkout_pane_list in Ubercart 5

Same name and namespace in other branches
  1. 6.2 uc_cart/uc_cart_checkout_pane.inc \_checkout_pane_list()

Build a list of checkout panes defined in the enabled modules.

5 calls to _checkout_pane_list()
uc_cart_checkout_form in uc_cart/uc_cart.module
uc_cart_checkout_panes_form in uc_cart/uc_cart.module
uc_cart_checkout_review in uc_cart/uc_cart.module
Allow a customer to review their order before finally submitting it.
uc_cart_checkout_settings_overview in uc_cart/uc_cart.module
_checkout_pane_data in uc_cart/uc_cart_checkout_pane.inc
Return data from a checkout pane by pane ID and the array key.

File

uc_cart/uc_cart_checkout_pane.inc, line 508
This file contains the callbacks for the default checkout panes supplied with Ubercart and their corresponding helper functions.

Code

function _checkout_pane_list($action = NULL) {
  static $panes;
  if (count($panes) > 0 && $action !== 'rebuild') {
    return $panes;
  }
  $panes = module_invoke_all('checkout_pane', NULL);
  foreach ($panes as $i => $value) {
    $panes[$i]['enabled'] = variable_get('uc_pane_' . $panes[$i]['id'] . '_enabled', !isset($panes[$i]['enabled']) ? TRUE : $panes[$i]['enabled']);
    $panes[$i]['weight'] = variable_get('uc_pane_' . $panes[$i]['id'] . '_weight', !isset($panes[$i]['weight']) ? 0 : $panes[$i]['weight']);
    $panes[$i]['review'] = !isset($panes[$i]['review']) ? TRUE : $panes[$i]['review'];
    $panes[$i]['process'] = !isset($panes[$i]['process']) ? TRUE : $panes[$i]['process'];
    $panes[$i]['collapsible'] = !isset($panes[$i]['collapsible']) ? TRUE : $panes[$i]['collapsible'];
  }
  usort($panes, 'uc_weight_sort');
  return $panes;
}