|
- <?php
-
- namespace Lc\CaracoleBundle\Repository\User;
-
- use Knp\Component\Pager\PaginatorInterface;
- use Lc\CaracoleBundle\Repository\MerchantRepositoryQueryTrait;
- use Lc\SovBundle\Model\User\UserInterface;
- use Lc\SovBundle\Repository\AbstractRepositoryQuery;
-
- class UserMerchantRepositoryQuery extends AbstractRepositoryQuery
- {
- use MerchantRepositoryQueryTrait;
-
- public function __construct(UserMerchantRepository $repository, PaginatorInterface $paginator)
- {
- parent::__construct($repository, 'userMerchant', $paginator);
- }
-
- public function filterByUser(UserInterface $user)
- {
- return $this
- ->andWhere('.user = :user')
- ->setParameter('user', $user);
- }
-
- public function filterIsCreditActive()
- {
- return $this
- ->andWhere('.creditActive = 1');
- }
- }
|