You are here

function facetapi_sort_display in Facet API 7.2

Same name and namespace in other branches
  1. 6.3 plugins/facetapi/widget.inc \facetapi_sort_display()
  2. 6 facetapi.adapter.inc \facetapi_sort_display()
  3. 7 plugins/facetapi/widget.inc \facetapi_sort_display()

Sorts by display value.

See also

uasort()

1 string reference to 'facetapi_sort_display'
facetapi_facetapi_sort_info in ./facetapi.facetapi.inc
Implements hook_facetapi_sort_info().

File

plugins/facetapi/widget.inc, line 380
Base widget plugin class and helper functions for facet sorting.

Code

function facetapi_sort_display(array $a, array $b) {
  $a_count = isset($a['#markup']) ? $a['#markup'] : '';
  $b_count = isset($b['#markup']) ? $b['#markup'] : '';
  return strcasecmp($a['#markup'], $b['#markup']);
}