Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

38 lines
855B

  1. <?php
  2. namespace Lc\CaracoleBundle\Doctrine;
  3. use Lc\SovBundle\Doctrine\QueryBuilder as SovQueryBuilder;
  4. /**
  5. * class EntityManager.
  6. *
  7. * @author La clic !!!!
  8. */
  9. class QueryBuilder extends SovQueryBuilder
  10. {
  11. public function andWhereMerchant($dqlId, $merchant):self
  12. {
  13. $this->andWhere($dqlId.'.merchant = :merchant');
  14. $this->setParameter('merchant', $merchant);
  15. return $this;
  16. }
  17. public function andWhereSection($dqlId, $section):self
  18. {
  19. $this->andWhere($dqlId.'.section = :section');
  20. $this->setParameter('section', $section);
  21. return $this;
  22. }
  23. public function andWhereMerchantManyToMany($dqlId, $merchant):self
  24. {
  25. $this->andWhere(':currentMerchant MEMBER OF '.$dqlId.'.merchants');
  26. $this->setParameter('currentMerchant', $merchant);
  27. return $this;
  28. }
  29. }