public function ViewsEFFieldsetTree::__construct in Views Exposed Form Fieldset 7.2
File
- includes/tree.inc, line 8
Class
- ViewsEFFieldsetTree
Code
public function __construct(array $items) {
$index = $this
->createIndex($items);
$orphans = array();
$tree =& $this
->createTree($index, $orphans);
$comparator = new ViewsEFFieldsetComparator('weight', ViewsEFFieldsetComparator::NULL_SORT_LAST);
$sort_callback = $comparator
->getCallback();
foreach ($index as &$item) {
uasort($item['children'], $sort_callback);
}
uasort($tree, $sort_callback);
uasort($orphans, $sort_callback);
$tree += $orphans;
$this
->setWeights($tree, TRUE);
$this
->setDepth($tree);
$this->tree = $tree;
}