/** * Returns whether the page has a navigation. * * @return bool */ public function hasNavigation() { return $this->hasNavigation && (!$this->parent || $this->parent->hasNavigation()); }