Browse Source

Merge branch 'develop'

master
Guillaume 4 years ago
parent
commit
151b20e07f
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      ShopBundle/Repository/ProductCategoryRepository.php

+ 3
- 1
ShopBundle/Repository/ProductCategoryRepository.php View File

{ {
$query = $this->createQueryBuilder('e'); $query = $this->createQueryBuilder('e');
$query->andWhere('e.parent = :idParentCategory'); $query->andWhere('e.parent = :idParentCategory');
$query->setParameter('idParentCategory', $parentCategory->getId());


if ($withOffline) $query->andWhere('e.status >= 0'); if ($withOffline) $query->andWhere('e.status >= 0');
else $query->andWhere('e.status = 1'); else $query->andWhere('e.status = 1');
$query->andWhere('pf.status = 1') ; $query->andWhere('pf.status = 1') ;
} }


$query->setParameter('idParentCategory', $parentCategory->getId());
$query->addOrderBy('e.position', 'ASC') ;

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

Loading…
Cancel
Save