Преглед на файлове

Adaptations ProductCategoryRepository et ProductFamilyRepository

feature/module_traiteur_v1
Guillaume преди 3 години
родител
ревизия
5d3be5c1ec
променени са 2 файла, в които са добавени 16 реда и са изтрити 0 реда
  1. +7
    -0
      ShopBundle/Repository/ProductCategoryRepository.php
  2. +9
    -0
      ShopBundle/Repository/ProductFamilyRepository.php

+ 7
- 0
ShopBundle/Repository/ProductCategoryRepository.php Целия файл

@@ -35,6 +35,13 @@ class ProductCategoryRepository extends BaseRepository implements DefaultReposit
return $query->getQuery()->getOneOrNullResult() ;
}

public function findOneByDevAlias($devAlias)
{
$query = $this->findByMerchantQuery() ;
$query->andWhere('e.devAlias = :devAlias')->setParameter('devAlias',$devAlias) ;
return $query->getQuery()->getOneOrNullResult() ;
}

public function findAllParents($withOffline = false)
{
$query = $this->findByMerchantQuery()

+ 9
- 0
ShopBundle/Repository/ProductFamilyRepository.php Целия файл

@@ -122,7 +122,16 @@ class ProductFamilyRepository extends BaseRepository implements DefaultRepositor
return $query->getQuery()->getResult() ;
}

public function getProductFamiliesBySection($section)
{
$query = $this->findByMerchantQuery() ;
$query = $this->joinRelations($query) ;

$query->andWhere(':section MEMBER OF e.sections')
->setParameter('section', $section) ;

return $query->getQuery()->getResult() ;
}


}

Loading…
Отказ
Запис