You are here

function notifications_admin_events_build_tree in Notifications 7

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

Build event tree

File

./notifications.admin.inc, line 299

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