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.

24 lines
664B

  1. <?php
  2. namespace Lc\CaracoleBundle\Repository\PointSale;
  3. use Knp\Component\Pager\PaginatorInterface;
  4. use Lc\CaracoleBundle\Model\Merchant\MerchantInterface;
  5. use Lc\SovBundle\Repository\AbstractRepositoryQuery;
  6. class PointSaleRepositoryQuery extends AbstractRepositoryQuery
  7. {
  8. public function __construct(PointSaleRepository $repository, PaginatorInterface $paginator)
  9. {
  10. parent::__construct($repository, 'r', $paginator);
  11. }
  12. public function filterByMerchant(MerchantInterface $merchant)
  13. {
  14. return $this
  15. ->andWhere(':merchant MEMBER OF .merchants')
  16. ->setParameter(':merchant', $merchant);
  17. }
  18. }