You are here

function _flag_compare_weight in Flag 7.3

Same name and namespace in other branches
  1. 6.2 flag.module \_flag_compare_weight()
  2. 7.2 flag.module \_flag_compare_weight()

Comparison function for uasort().

1 string reference to '_flag_compare_weight'
flag_get_flags in ./flag.module
List all flags available.

File

./flag.module, line 2017
The Flag module.

Code

function _flag_compare_weight($flag1, $flag2) {
  if ($flag1->weight == $flag2->weight) {
    return 0;
  }
  return $flag1->weight < $flag2->weight ? -1 : 1;
}