src/Backend/Modules/Commerce/Domain/Specification/SpecificationRepository.php
/**
     * Find the specification filters based on the given category.
     */
Find the specification filters based on the given category.
Find the specification filters based on the given category .
public function findFiltersByCategory(Category $category): array
    {
        $queryBuilder = $this->createQueryBuilder('s');
        return $queryBuilder->select(['s', 'sv'])
            ->leftJoin('s.specificationValues', 'sv')
            ->leftJoin('sv.products', 'p')
            ->where('s.filter = :filter')
            ->andWhere('p.category = :category')
            ->orderBy('s.sequence', 'ASC')
            ->setParameter('filter', true)
            ->setParameter('category', $category)
            ->getQuery()
            ->getResult();
    }
public function findFiltersByCategory ( Category $ category ) : array { $ queryBuilder = $ this -> createQueryBuilder ( 's' ) ; return $ queryBuilder -> select ( [ 's' , 'sv' ] ) -> leftJoin ( 's.specificationValues' , 'sv' ) -> leftJoin ( 'sv.products' , 'p' ) -> where ( 's.filter = :filter' ) -> andWhere ( 'p.category = :category' ) -> orderBy ( 's.sequence' , 'ASC' ) -> setParameter ( 'filter' , true ) -> setParameter ( 'category' , $ category ) -> getQuery ( ) -> getResult ( ) ; }
Find the specification filters based on the given category.
Find the specification filters based on the given category .