You are here

function drupal_sort_title in Drupal 7

Array sorting callback; sorts elements by 'title' key.

1 string reference to 'drupal_sort_title'
system_admin_index in modules/system/system.admin.inc
Menu callback; prints a listing of admin tasks, organized by module.

File

includes/common.inc, line 6630
Common functions that many Drupal modules will need to reference.

Code

function drupal_sort_title($a, $b) {
  if (!isset($b['title'])) {
    return -1;
  }
  if (!isset($a['title'])) {
    return 1;
  }
  return strcasecmp($a['title'], $b['title']);
}