_field_ui_reduce_order

function _field_ui_reduce_order

_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

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;
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!field_ui!field_ui.admin.inc/function/_field_ui_reduce_order/7.x

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部