function facetapi_sort_display in Facet API 7
Same name and namespace in other branches
- 6.3 plugins/facetapi/widget.inc \facetapi_sort_display()
- 6 facetapi.adapter.inc \facetapi_sort_display()
- 7.2 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 398 - Base widget plugin class and helper functions for facet sorting.
Code
function facetapi_sort_display(array $a, array $b) {
$a_value = isset($a['#markup']) ? $a['#markup'] : '';
$b_value = isset($b['#markup']) ? $b['#markup'] : '';
$a_value = _facetapi_removeAccents($a_value);
$b_value = _facetapi_removeAccents($b_value);
return strnatcasecmp($a_value, $b_value);
}