Skip navigation
Help

_uc_order_pane_list

7 uc_order.order_pane.inc _uc_order_pane_list($view = 'view')

Builds a list of order panes defined in the enabled modules.

5 calls to _uc_order_pane_list()

File

ubercart/uc_order/uc_order.order_pane.inc, line 1351
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;
}