|
- <?php
-
- namespace Lc\CaracoleBundle\Repository\PointSale;
-
- use Knp\Component\Pager\PaginatorInterface;
- use Lc\CaracoleBundle\Model\Merchant\MerchantInterface;
- use Lc\CaracoleBundle\Repository\MerchantRepositoryQueryTrait;
- use Lc\CaracoleBundle\Repository\StatusRepositoryQueryTrait;
- use Lc\SovBundle\Repository\AbstractRepositoryQuery;
-
- class PointSaleRepositoryQuery extends AbstractRepositoryQuery
- {
- use StatusRepositoryQueryTrait;
-
- public function __construct(PointSaleRepository $repository, PaginatorInterface $paginator)
- {
- parent::__construct($repository, 'r', $paginator);
- }
-
- public function filterByMerchant(MerchantInterface $merchant)
- {
- return $this
- ->andWhere(':merchant MEMBER OF .merchants')
- ->setParameter(':merchant', $merchant);
- }
- }
|