function _order_pane_list in Ubercart 5
Same name and namespace in other branches
- 6.2 uc_order/uc_order.order_pane.inc \_order_pane_list()
Build a list of order panes defined in the enabled modules.
7 calls to _order_pane_list()
- theme_uc_order_edit_form in uc_order/
uc_order.module - uc_order_edit_form in uc_order/
uc_order.module - uc_order_edit_form_submit in uc_order/
uc_order.module - uc_order_panes_form in uc_order/
uc_order.module - uc_order_settings_overview in uc_order/
uc_order.module - Display the order settings overview.
File
- uc_order/
uc_order_order_pane.inc, line 829 - This file contains the callbacks for the default order panes supplied with Ubercart and their corresponding helper functions.
Code
function _order_pane_list($view = 'view') {
static $panes;
if (count($panes) > 0 && $action !== 'rebuild') {
return $panes;
}
$panes = module_invoke_all('order_pane', NULL);
foreach ($panes as $i => $value) {
$panes[$i]['enabled'] = variable_get('uc_order_pane_' . $panes[$i]['id'] . '_enabled', !isset($panes[$i]['enabled']) ? TRUE : $panes[$i]['enabled']);
$panes[$i]['weight'] = variable_get('uc_order_pane_' . $panes[$i]['id'] . '_weight_' . $view, !isset($panes[$i]['weight']) ? 0 : $panes[$i]['weight']);
}
usort($panes, 'uc_weight_sort');
return $panes;
}