function _field_ui_reduce_order in Drupal 7
Determines the rendering order of an array representing a tree.
Callback for array_reduce() within field_ui_table_pre_render().
1 string reference to '_field_ui_reduce_order'
- field_ui_table_pre_render in modules/
field_ui/ field_ui.admin.inc - Pre-render callback for field_ui_table elements.
File
- modules/
field_ui/ field_ui.admin.inc, line 79 - Administrative interface for custom field type creation.
Code
function _field_ui_reduce_order($array, $a) {
$array = !isset($array) ? array() : $array;
if ($a['name']) {
$array[] = $a['name'];
}
if (!empty($a['children'])) {
uasort($a['children'], 'drupal_sort_weight');
$array = array_merge($array, array_reduce($a['children'], '_field_ui_reduce_order'));
}
return $array;
}