function _webform_components_sort in Webform 5
Same name and namespace in other branches
- 5.2 webform.module \_webform_components_sort()
- 6.3 webform.module \_webform_components_sort()
- 6.2 webform.module \_webform_components_sort()
- 7.4 webform.module \_webform_components_sort()
- 7.3 webform.module \_webform_components_sort()
Helper for the uasort in webform_tree_sort()
1 string reference to '_webform_components_sort'
- _webform_components_tree_sort in ./
webform.module - Sort each level of a component tree by weight and name
File
- ./
webform.module, line 1937
Code
function _webform_components_sort($a, $b) {
if ($a['weight'] == $b['weight']) {
return strcasecmp($a['name'], $b['name']);
}
return $a['weight'] < $b['weight'] ? -1 : 1;
}