function _page_manager_handler_sort in Chaos Tool Suite (ctools) 7
Same name and namespace in other branches
- 6 page_manager/page_manager.admin.inc \_page_manager_handler_sort()
Used as a callback to uasort to sort the task cache by weight.
The 'name' field is used as a backup when weights are the same, which can happen when multiple modules put items out there at the same weight.
1 string reference to '_page_manager_handler_sort'
- page_manager_handler_rearrange_submit in page_manager/
page_manager.admin.inc
File
- page_manager/
page_manager.admin.inc, line 1609 - Administrative functions for the page manager.
Code
function _page_manager_handler_sort($a, $b) {
if ($a['weight'] < $b['weight']) {
return -1;
}
elseif ($a['weight'] > $b['weight']) {
return 1;
}
elseif ($a['name'] < $b['name']) {
return -1;
}
elseif ($a['name'] > $b['name']) {
return 1;
}
}