public function addPageFilter(Page $page)
    {
        if ($page && !$page->isRoot()) {
            $this->leftJoin('cc._mainnode', 'p')
                    ->leftJoin('p._section', 'sp')
                    ->andWhere('sp._root = :selectedPageRoot')
                    ->andWhere('sp._leftnode >= :selectedPageLeftnode')
                    ->andWhere('sp._rightnode <= :selectedPageRightnode')
                    ->setParameters([
                        'selectedPageRoot' => $page->getSection()->getRoot(),
                        'selectedPageLeftnode' => $page->getLeftnode(),
                        'selectedPageRightnode' => $page->getRightnode(),
                    ]);
        }
    }
public function addPageFilter(Page $page)
    {
        if ($page && !$page->isRoot()) {
            $this->leftJoin('cc._mainnode', 'p')
                    ->leftJoin('p._section', 'sp')
                    ->andWhere('sp._root = :selectedPageRoot')
                    ->andWhere('sp._leftnode >= :selectedPageLeftnode')
                    ->andWhere('sp._rightnode <= :selectedPageRightnode')
                    ->setParameters([
                        'selectedPageRoot' => $page->getSection()->getRoot(),
                        'selectedPageLeftnode' => $page->getLeftnode(),
                        'selectedPageRightnode' => $page->getRightnode(),
                    ]);
        }
    }
public function addPageFilter ( Page $ page ) { if ( $ page && ! $ page -> isRoot ( ) ) { $ this -> leftJoin ( 'cc._mainnode' , 'p' ) -> leftJoin ( 'p._section' , 'sp' ) -> andWhere ( 'sp._root = :selectedPageRoot' ) -> andWhere ( 'sp._leftnode >= :selectedPageLeftnode' ) -> andWhere ( 'sp._rightnode <= :selectedPageRightnode' ) -> setParameters ( [ 'selectedPageRoot' => $ page -> getSection ( ) -> getRoot ( ) , 'selectedPageLeftnode' => $ page -> getLeftnode ( ) , 'selectedPageRightnode' => $ page -> getRightnode ( ) , ] ) ; } }
Set a page to filter the query on a nested portion.

@param  BackBee\NestedNode\Page $page
Set a page to filter the query on a nested portion .