You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

пре 3 година
пре 3 година
пре 3 година
12345678910111213141516171819202122232425262728293031323334353637
  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. }