function _views_sort_arrays in Views (for Drupal 7) 5
sort callback
3 string references to '_views_sort_arrays'
- _views_get_arguments in ./
views_cache.inc - Return the arguments array; construct one if we haven't already. The array is cached in a global, safely named variable so that arguments are only constructed once per run.
- _views_get_default_views in ./
views_cache.inc - Build default view information from all modules and cache it.
- _views_get_style_plugins in ./
views_cache.inc - Return the style plugins; construct one if we haven't already. The array is cached in a static variable so that arguments are only constructed once per run.
File
- ./
views_cache.inc, line 262
Code
function _views_sort_arrays($a, $b) {
$a = (array) $a;
// safety -- something send objects.
$b = (array) $b;
if ($a['weight'] == $b['weight']) {
if ($a['name'] == $b['name']) {
return 0;
}
return $a['name'] < $b['name'] ? -1 : 1;
}
return $a['weight'] > $b['weight'] ? -1 : 1;
}