You are here

function _uc_quote_type_sort in Ubercart 8.4

Same name and namespace in other branches
  1. 5 shipping/uc_quote/uc_quote.module \_uc_quote_type_sort()
  2. 6.2 shipping/uc_quote/uc_quote.module \_uc_quote_type_sort()
  3. 7.3 shipping/uc_quote/uc_quote.module \_uc_quote_type_sort()

Callback for uasort().

1 string reference to '_uc_quote_type_sort'
uc_quote_shipping_type_options in shipping/uc_quote/uc_quote.module
Returns an options array of shipping types.

File

shipping/uc_quote/uc_quote.module, line 568
The controller module for fulfillment modules that process physical goods.

Code

function _uc_quote_type_sort($a, $b) {
  $aw = $a['weight'];
  $bw = $b['weight'];
  if ($aw == $bw) {
    return strcasecmp($a['id'], $b['id']);
  }
  else {
    return $aw < $bw ? -1 : 1;
  }
}