public function isVisible()
    {
        $c = $this;
        while($c) {
            if (isset($c->invisible) && $c->invisible) {
                return false;
            }
            $c = $c->parent;
        }
        return true;
    }