protected function buildHandlerTree($all_handlers)
{
$tree = array();
$root = elgg_get_root_path();
foreach ($all_handlers as $hook => $types) {
foreach ($types as $type => $priorities) {
ksort($priorities);
foreach ($priorities as $priority => $handlers) {
foreach ($handlers as $callable) {
$description = $this->describeCallable($callable, $root);
$callable = "{$priority}: {$description}";
$tree["{$hook}, {$type}"][] = $callable;
}
}
}
}
ksort($tree);
return $tree;
}