1 field_ui.admin.inc _field_ui_reduce_order($array, $a)

Determines the rendering order of an array representing a tree.

Callback for array_reduce() within field_ui_table_pre_render().

File

core/modules/field_ui/field_ui.admin.inc, line 129
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'])) {
    backdrop_sort($a['children']);
    $array = array_merge($array, array_reduce($a['children'], '_field_ui_reduce_order'));
  }
  return $array;
}