|
|
@@ -55,7 +55,7 @@ class ProductCategoryRepository extends BaseRepository implements DefaultReposit |
|
|
|
return $query->getQuery()->getResult(); |
|
|
|
} |
|
|
|
|
|
|
|
public function findAllByParent($parentCategory, $withOffline = false, $withEmptyCategories = true) |
|
|
|
public function findAllByParent($parentCategory, $withOffline = false, $withEmptyCategories = true, $filterBySpecificDay = false) |
|
|
|
{ |
|
|
|
$query = $this->createQueryBuilder('e'); |
|
|
|
$query->andWhere('e.parent = :idParentCategory'); |
|
|
@@ -69,8 +69,10 @@ class ProductCategoryRepository extends BaseRepository implements DefaultReposit |
|
|
|
$query->andWhere('pf.status = 1') ; |
|
|
|
} |
|
|
|
|
|
|
|
$query->andWhere('e.displaySpecificDay IS NULL OR e.displaySpecificDay = :dayToday') ; |
|
|
|
$query->setParameter('dayToday', date('N')) ; |
|
|
|
if($filterBySpecificDay) { |
|
|
|
$query->andWhere('e.displaySpecificDay IS NULL OR e.displaySpecificDay = :dayToday') ; |
|
|
|
$query->setParameter('dayToday', date('N')) ; |
|
|
|
} |
|
|
|
|
|
|
|
$query->addOrderBy('e.position', 'ASC') ; |
|
|
|
|