private static function commerce_backoffice_handler_field_term_entity_tid::sort_taxonomy_weight in Commerce Backoffice 7
Sort the taxonomy terms by weight.
File
- includes/
views/ handlers/ commerce_backoffice_handler_field_term_entity_tid.inc, line 121 - Definition of commerce_backoffice_handler_field_term_entity_tid.
Class
- commerce_backoffice_handler_field_term_entity_tid
- Field handler to display all taxonomy terms of an entity.
Code
private static function sort_taxonomy_weight($a, $b) {
if ($a->weight == $b->weight) {
return 0;
}
return $a->weight < $b->weight ? -1 : 1;
}