You are here

function notifications_admin_events_build_tree in Notifications 6.4

Same name and namespace in other branches
  1. 7 notifications.admin.inc \notifications_admin_events_build_tree()

Build event tree

1 call to notifications_admin_events_build_tree()
notifications_admin_events_form in ./notifications.admin.inc
Event configuration administration

File

./notifications.admin.inc, line 418

Code

function notifications_admin_events_build_tree($events) {
  $tree = array();
  foreach ($events as $key => &$event) {
    if (empty($event['parent'])) {
      $tree[$key] =& $event;
    }
    else {
      $events[$event['parent']]['children'][$key] =& $event;
    }
  }
  return $tree;
}