function _uc_order_pane_list in Ubercart 7.3
Builds a list of order panes defined in the enabled modules.
5 calls to _uc_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_uc_order_pane().
- uc_order_edit_form_validate in uc_order/
uc_order.admin.inc - Prevents order edits from colliding.
- uc_order_view in uc_order/
uc_order.module - Displays the order view screen, constructed via hook_uc_order_pane().
- _uc_order_pane_data in uc_order/
uc_order.order_pane.inc - Returns data from an order pane by pane ID and the array key.
File
- uc_order/
uc_order.order_pane.inc, line 1353 - This file contains the callbacks for the default order panes supplied with Ubercart and their corresponding helper functions.
Code
function _uc_order_pane_list($view = 'view') {
static $panes = array();
if (count($panes) > 0) {
return $panes;
}
foreach (module_invoke_all('uc_order_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,
);
$panes[$id] = $pane;
}
// Allow other modules to alter the defaults.
drupal_alter('uc_order_pane', $panes);
uasort($panes, 'uc_weight_sort');
return $panes;
}