public function isAncestorOf(Page $page, $strict = true)
    {
        if (!$this->hasMainSection()) {
            return ($this === $page && false === $strict);
        }
        return $this->getSection()->isAncestorOf($page->getSection(), $strict) || $page->getParent() === $this;
    }
public function isAncestorOf(Page $page, $strict = true)
    {
        if (!$this->hasMainSection()) {
            return ($this === $page && false === $strict);
        }
        return $this->getSection()->isAncestorOf($page->getSection(), $strict) || $page->getParent() === $this;
    }
public function isAncestorOf ( Page $ page , $ strict = true ) { if ( ! $ this -> hasMainSection ( ) ) { return ( $ this === $ page && false === $ strict ) ; } return $ this -> getSection ( ) -> isAncestorOf ( $ page -> getSection ( ) , $ strict ) || $ page -> getParent ( ) === $ this ; }
Is this page is an ancestor of the provided one?

@param  Page                 $page
@param  boolean              $strict             Optional, if true (default) this page is excluded of ancestors list.

@return boolean                                  True if this page is an anscestor of provided page, false otherwise.
Is this page is an ancestor of the provided one?