IMP_Ftree::expand PHP Method

expand() public method

Expand an element.
public expand ( mixed $elts, boolean $expandall = false )
$elts mixed The element (or an array of elements) to expand.
$expandall boolean Expand all subelements?
    public function expand($elts, $expandall = false)
    {
        foreach (is_array($elts) ? $elts : array($elts) as $val) {
            if (($elt = $this[$val]) && $elt->children) {
                if (!$elt->open) {
                    $elt->open = true;
                }
                /* Expand all children beneath this one. */
                if ($expandall) {
                    $this->expand($this->_parent[strval($elt)]);
                }
            }
        }
    }