public function siblingsOf(ChildCategory $category, ConnectionInterface $con = null)
    {
        if ($category->isRoot()) {
            return $this->
                add(ChildCategory::LEVEL_COL, '1<>1', Criteria::CUSTOM);
        } else {
            return $this
                ->childrenOf($category->getParent($con))
                ->prune($category);
        }
    }
public function siblingsOf(ChildCategory $category, ConnectionInterface $con = null)
    {
        if ($category->isRoot()) {
            return $this->
                add(ChildCategory::LEVEL_COL, '1<>1', Criteria::CUSTOM);
        } else {
            return $this
                ->childrenOf($category->getParent($con))
                ->prune($category);
        }
    }
public function siblingsOf ( ChildCategory $ category , ConnectionInterface $ con = null ) { if ( $ category -> isRoot ( ) ) { return $ this -> add ( ChildCategory :: LEVEL_COL , '1<>1' , Criteria :: CUSTOM ) ; } else { return $ this -> childrenOf ( $ category -> getParent ( $ con ) ) -> prune ( $ category ) ; } }
Filter the query to restrict the result to siblings of an object.
The result does not include the object passed as parameter.

@param     ChildCategory $category The object to use for sibling search
@param      ConnectionInterface $con Connection to use.

@return    $this|ChildCategoryQuery The current query, for fluid interface
Filter the query to restrict the result to siblings of an object . The result does not include the object passed as parameter .