You are here

function _uc_quote_type_sort in Ubercart 6.2

Same name and namespace in other branches
  1. 8.4 shipping/uc_quote/uc_quote.module \_uc_quote_type_sort()
  2. 5 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().

4 string references to '_uc_quote_type_sort'
uc_cart_pane_quotes in shipping/uc_quote/uc_quote.module
Cart pane callback.
uc_quote_shipping_method_options in shipping/uc_quote/uc_quote.module
Returns an options array of shipping methods.
uc_quote_shipping_type_options in shipping/uc_quote/uc_quote.module
Returns an options array of shipping types.
_uc_quote_assemble_quotes in shipping/uc_quote/uc_quote.pages.inc
Pulls the get_quote_from_* triggers and assembles their returned data.

File

shipping/uc_quote/uc_quote.module, line 1181
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;
  }
}