function _order_pane_list in Ubercart 6.2
Same name and namespace in other branches
- 5 uc_order/uc_order_order_pane.inc \_order_pane_list()
Builds a list of order panes defined in the enabled modules.
6 calls to _order_pane_list()
- theme_uc_order_edit_form in uc_order/
uc_order.admin.inc - Formats the uc_order_edit_form().
- uc_order_edit_form in uc_order/
uc_order.admin.inc - Displays the order edit screen, constructed via hook_order_pane().
- uc_order_edit_form_submit in uc_order/
uc_order.admin.inc - Form submission handler for uc_order_edit_form().
- uc_order_panes_form in uc_order/
uc_order.admin.inc - Settings for the order panes.
- uc_order_view in uc_order/
uc_order.admin.inc - Displays the order view screen, constructed via hook_order_pane().
File
- uc_order/
uc_order.order_pane.inc, line 1072 - 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) {
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']);
}
// Allow other modules to alter the panes.
drupal_alter('order_pane', $panes);
// Make sure that all the required attributes are set
foreach ($panes as $i => $value) {
$panes[$i]['enabled'] = !isset($panes[$i]['enabled']) ? TRUE : $panes[$i]['enabled'];
$panes[$i]['weight'] = !isset($panes[$i]['weight']) ? 0 : $panes[$i]['weight'];
}
usort($panes, 'uc_weight_sort');
return $panes;
}