function wsclient_ui_label_sort in Web service client 7
Helper function to sort a nested data information array based on the label of the items.
1 call to wsclient_ui_label_sort()
- wsclient_service_form in wsclient_ui/
wsclient_ui.inc - Provides a form to add, edit and clone web service descriptions.
File
- wsclient_ui/
wsclient_ui.inc, line 1273 - WSClient UI - implements service description management and configuration screens.
Code
function wsclient_ui_label_sort($data_info, $label_key = 'label') {
$sort_info = array();
foreach ($data_info as $key => $info) {
$sort_info[$key] = $info[$label_key];
}
natcasesort($sort_info);
foreach ($sort_info as $key => $label) {
$sort_info[$key] = $data_info[$key];
}
return $sort_info;
}