public function andIsSiblingsOf(Page $page, $strict = false, array $order = null, $limit = null, $start = 0)
    {
        if (null === $page->getParent()) {
            $this->andParentIs(null);
        } else {
            $this->andIsDescendantOf($page->getParent(), false, $page->getLevel());
        }

        if (true === $strict) {
            $suffix = $this->getSuffix();
            $this->andWhere($this->getAlias().' != :page'.$suffix)
                    ->setParameter('page'.$suffix, $page);
        }

        if (null !== $order) {
            $this->addMultipleOrderBy($order);
        }

        if (null !== $limit) {
            $this->setMaxResults($limit)
                    ->setFirstResult($start);
        }

        return $this;
    }
public function andIsSiblingsOf(Page $page, $strict = false, array $order = null, $limit = null, $start = 0)
    {
        if (null === $page->getParent()) {
            $this->andParentIs(null);
        } else {
            $this->andIsDescendantOf($page->getParent(), false, $page->getLevel());
        }

        if (true === $strict) {
            $suffix = $this->getSuffix();
            $this->andWhere($this->getAlias().' != :page'.$suffix)
                    ->setParameter('page'.$suffix, $page);
        }

        if (null !== $order) {
            $this->addMultipleOrderBy($order);
        }

        if (null !== $limit) {
            $this->setMaxResults($limit)
                    ->setFirstResult($start);
        }

        return $this;
    }
public function andIsSiblingsOf ( Page $ page , $ strict = false , array $ order = null , $ limit = null , $ start = 0 ) { if ( null === $ page -> getParent ( ) ) { $ this -> andParentIs ( null ) ; } else { $ this -> andIsDescendantOf ( $ page -> getParent ( ) , false , $ page -> getLevel ( ) ) ; } if ( true === $ strict ) { $ suffix = $ this -> getSuffix ( ) ; $ this -> andWhere ( $ this -> getAlias ( ) . ' != :page' . $ suffix ) -> setParameter ( 'page' . $ suffix , $ page ) ; } if ( null !== $ order ) { $ this -> addMultipleOrderBy ( $ order ) ; } if ( null !== $ limit ) { $ this -> setMaxResults ( $ limit ) -> setFirstResult ( $ start ) ; } return $ this ; }
Add query part to select siblings of page.

@param  Page                 $page               The page to look for siblings
@param  boolean              $strict             Optional, if false (by default) $node is include to the selection
@param  array|null           $order              Optional, ordering spec ( [$field => $sort] )
@param  integer|null         $limit              Optional, max number of results, if null no limit
@param  integer              $start              Optional, first result index (0 by default)

@return PageQueryBuilder
Add query part to select siblings of page .