/** * Returns a boolean value indicating whether the page is visible * * @param bool $recursive [optional] whether page should be considered * invisible if parent is invisible. Default is * false. * @return bool whether page should be considered visible */ public function isVisible($recursive = false) { if ($recursive && isset($this->_parent) && $this->_parent instanceof self) { if (!$this->_parent->isVisible(true)) { return false; } } return $this->_visible; }