IMP_Ftree::_sortLevel PHP Method

_sortLevel() protected method

Sort a level in the tree.
protected _sortLevel ( string $id )
$id string The parent element whose children need to be sorted.
    protected function _sortLevel($id)
    {
        if (($elt = $this[$id]) && $elt->needsort) {
            if (count($this->_parent[strval($elt)]) > 1) {
                $this->sortList($this->_parent[strval($elt)], $elt);
            }
            $this->setAttribute('needsort', $elt, false);
        }
    }