public function contains_active_node() {
        if ($this->isactive) {
            return true;
        } else {
            foreach ($this->children as $child) {
                if ($child->isactive || $child->contains_active_node()) {
                    return true;
                }
            }
        }
        return false;
    }
public function contains_active_node() {
        if ($this->isactive) {
            return true;
        } else {
            foreach ($this->children as $child) {
                if ($child->isactive || $child->contains_active_node()) {
                    return true;
                }
            }
        }
        return false;
    }
public function contains_active_node ( ) { if ( $ this -> isactive ) { return true ; } else { foreach ( $ this -> children as $ child ) { if ( $ child -> isactive || $ child -> contains_active_node ( ) ) { return true ; } } } return false ; }
Checks if this node or any of its children contain the active node.

Recursive.

@return bool
Checks if this node or any of its children contain the active node .