src/Backend/Modules/Commerce/Domain/Category/CategoryRepository.php
/**
     * Find parent categories ordered by sequence.
     *
     * @return Category[]
     */
Find parent categories ordered by sequence.
@return Category[]
Find parent categories ordered by sequence . @return Category []
public function findParents(Locale $locale)
    {
        $queryBuilder = $this->createQueryBuilder('i');
        return $queryBuilder
            ->where('i.parent IS NULL')
            ->andWhere('i.locale = :locale')
            ->setParameter('locale', $locale)
            ->orderBy('i.sequence', 'ASC')
            ->getQuery()
            ->getResult();
    }
public function findParents ( Locale $ locale ) { $ queryBuilder = $ this -> createQueryBuilder ( 'i' ) ; return $ queryBuilder -> where ( 'i.parent IS NULL' ) -> andWhere ( 'i.locale = :locale' ) -> setParameter ( 'locale' , $ locale ) -> orderBy ( 'i.sequence' , 'ASC' ) -> getQuery ( ) -> getResult ( ) ; }
Find parent categories ordered by sequence.
Find parent categories ordered by sequence .