You are here

function _uc_cart_checkout_prev_pane in Ubercart 6.2

Same name and namespace in other branches
  1. 5 uc_cart/uc_cart_checkout_pane.inc \_uc_cart_checkout_prev_pane()
  2. 7.3 uc_cart/uc_cart_checkout_pane.inc \_uc_cart_checkout_prev_pane()

Finds the collapsible pane displayed above the pane with an ID of $pane_id.

1 call to _uc_cart_checkout_prev_pane()
uc_cart_checkout_form in uc_cart/uc_cart.pages.inc
The checkout form built up from the enabled checkout panes.

File

uc_cart/uc_cart_checkout_pane.inc, line 488
Callbacks for the default Ubercart checkout panes and their corresponding helper functions.

Code

function _uc_cart_checkout_prev_pane($panes, $pane_id = NULL) {
  if (is_null($pane_id)) {
    return FALSE;
  }
  $prev = FALSE;
  foreach ($panes as $target) {
    if ($target['id'] == $pane_id) {
      return $prev;
    }
    if ($target['collapsible'] && $target['enabled']) {
      $prev = $target['id'];
    }
  }
  return FALSE;
}