function acsf_registry_sort in Acquia Cloud Site Factory Connector 8
Same name and namespace in other branches
- 8.2 acsf.module \acsf_registry_sort()
Determines sort order for usort.
1 string reference to 'acsf_registry_sort'
- acsf_build_registry in ./
acsf.module - Builds the registry of ACSF compatible class files.
File
- ./
acsf.module, line 33 - Acquia Cloud Site Factory Connector.
Code
function acsf_registry_sort($a, $b) {
if (!isset($a['weight'])) {
$a['weight'] = 0;
}
if (!isset($b['weight'])) {
$b['weight'] = 0;
}
if ($a['weight'] == $b['weight']) {
return 0;
}
return $a['weight'] < $b['weight'] ? -1 : 1;
}