lib/Repository/ProductRepository.php
private function createQueryBuilderWithLocaleCode(string $localeCode): QueryBuilder
    {
        $queryBuilder = $this->createQueryBuilder('o');
        $queryBuilder
            ->addSelect('translation')
            ->leftJoin('o.translations', 'translation')
            ->andWhere('translation.locale = :localeCode')
            ->setParameter('localeCode', $localeCode)
        ;

        return $queryBuilder;
    }
private function createQueryBuilderWithLocaleCode(string $localeCode): QueryBuilder
    {
        $queryBuilder = $this->createQueryBuilder('o');
        $queryBuilder
            ->addSelect('translation')
            ->leftJoin('o.translations', 'translation')
            ->andWhere('translation.locale = :localeCode')
            ->setParameter('localeCode', $localeCode)
        ;

        return $queryBuilder;
    }
private function createQueryBuilderWithLocaleCode ( string $ localeCode ) : QueryBuilder { $ queryBuilder = $ this -> createQueryBuilder ( 'o' ) ; $ queryBuilder -> addSelect ( 'translation' ) -> leftJoin ( 'o.translations' , 'translation' ) -> andWhere ( 'translation.locale = :localeCode' ) -> setParameter ( 'localeCode' , $ localeCode ) ; return $ queryBuilder ; }
Creates a query builder to filter products by locale.
Creates a query builder to filter products by locale .