function _views_sort_types

1 string reference to '_views_sort_types'
views_fetch_fields in drupal/core/modules/views/views_ui/admin.inc
Fetch a list of all fields available for a given base type.

File

drupal/core/modules/views/views_ui/admin.inc, line 2119
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;
}