public function getAncestorsAction(Page $page)
    {
        $ancestors = $this->getPageRepository()->getAncestors($page);

        return $this->createResponse($this->formatCollection($ancestors));
    }
public function getAncestorsAction(Page $page)
    {
        $ancestors = $this->getPageRepository()->getAncestors($page);

        return $this->createResponse($this->formatCollection($ancestors));
    }
public function getAncestorsAction ( Page $ page ) { $ ancestors = $ this -> getPageRepository ( ) -> getAncestors ( $ page ) ; return $ this -> createResponse ( $ this -> formatCollection ( $ ancestors ) ) ; }
Get page ancestors
@param Page $page the page we want to get its ancestors
@return \Symfony\Component\HttpFoundation\Response
@Rest\ParamConverter(name="page", class="BackBee\NestedNode\Page")
Get page ancestors