function _views_sort_types in Views (for Drupal 7) 7.3
Same name and namespace in other branches
- 8.3 views_ui/admin.inc \_views_sort_types()
- 6.3 includes/admin.inc \_views_sort_types()
- 6.2 includes/admin.inc \_views_sort_types()
1 string reference to '_views_sort_types'
- views_fetch_fields in includes/
admin.inc - Fetch a list of all fields available for a given base type.
File
- includes/
admin.inc, line 5265 - Provides the Views' administrative interface.
Code
function _views_sort_types($a, $b) {
$a_group = drupal_strtolower($a['group']);
$b_group = drupal_strtolower($b['group']);
if ($a_group != $b_group) {
return $a_group < $b_group ? -1 : 1;
}
$a_title = drupal_strtolower($a['title']);
$b_title = drupal_strtolower($b['title']);
if ($a_title != $b_title) {
return $a_title < $b_title ? -1 : 1;
}
return 0;
}