function element_sort_by_title in Drupal 7
Array sorting callback; sorts elements by title.
2 string references to 'element_sort_by_title'
- system_modules in modules/
system/ system.admin.inc - Menu callback; provides module enable/disable interface.
- theme_simpletest_test_table in modules/
simpletest/ simpletest.pages.inc - Returns HTML for a test list generated by simpletest_test_form() into a table.
File
- includes/
common.inc, line 6556 - Common functions that many Drupal modules will need to reference.
Code
function element_sort_by_title($a, $b) {
$a_title = is_array($a) && isset($a['#title']) ? $a['#title'] : '';
$b_title = is_array($b) && isset($b['#title']) ? $b['#title'] : '';
return strnatcasecmp($a_title, $b_title);
}