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.

25 line
726B

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