function _uc_checkout_pane_list in Ubercart 7.3
Builds a list of checkout panes defined in the enabled modules.
5 calls to _uc_checkout_pane_list()
- uc_ajax_admin_form in uc_ajax_admin/
uc_ajax_admin.module - Administration form for uc_ajax.
- uc_cart_checkout_form in uc_cart/
uc_cart.pages.inc - The checkout form built up from the enabled checkout panes.
- uc_cart_checkout_review in uc_cart/
uc_cart.pages.inc - Allows a customer to review their order before finally submitting it.
- uc_cart_checkout_settings_form in uc_cart/
uc_cart.admin.inc - General checkout settings.
- _uc_checkout_pane_data in uc_cart/
uc_cart_checkout_pane.inc - Returns data from a checkout pane by pane ID and the array key.
File
- uc_cart/
uc_cart_checkout_pane.inc, line 415 - Callbacks for the default Ubercart checkout panes plus helper functions.
Code
function _uc_checkout_pane_list($action = NULL) {
static $panes = array();
if (count($panes) > 0 && $action !== 'rebuild') {
return $panes;
}
foreach (module_invoke_all('uc_checkout_pane') as $id => $pane) {
// Preserve backward compatibility for panes with no key specified.
if (is_numeric($id)) {
$id = $pane['id'];
}
// Set defaults.
$pane += array(
'id' => $id,
'enabled' => TRUE,
'weight' => 0,
'review' => TRUE,
'process' => TRUE,
'collapsible' => TRUE,
);
$pane['enabled'] = variable_get('uc_pane_' . $id . '_enabled', $pane['enabled']);
$pane['weight'] = variable_get('uc_pane_' . $id . '_weight', $pane['weight']);
$panes[$id] = $pane;
}
// Allow other modules to alter the defaults.
drupal_alter('uc_checkout_pane', $panes);
uasort($panes, 'uc_weight_sort');
return $panes;
}