Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

UserMerchantRepositoryQuery.php 841B

pirms 3 gadiem
pirms 3 gadiem
pirms 3 gadiem
pirms 3 gadiem
pirms 3 gadiem
12345678910111213141516171819202122232425262728293031
  1. <?php
  2. namespace Lc\CaracoleBundle\Repository\User;
  3. use Knp\Component\Pager\PaginatorInterface;
  4. use Lc\CaracoleBundle\Repository\MerchantRepositoryQueryTrait;
  5. use Lc\SovBundle\Model\User\UserInterface;
  6. use Lc\SovBundle\Repository\AbstractRepositoryQuery;
  7. class UserMerchantRepositoryQuery extends AbstractRepositoryQuery
  8. {
  9. use MerchantRepositoryQueryTrait;
  10. public function __construct(UserMerchantRepository $repository, PaginatorInterface $paginator)
  11. {
  12. parent::__construct($repository, 'r', $paginator);
  13. }
  14. public function filterByUser(UserInterface $user)
  15. {
  16. return $this
  17. ->andWhere('.user = :user')
  18. ->setParameter('user', $user);
  19. }
  20. public function filterIsCreditActive()
  21. {
  22. return $this
  23. ->andWhere('.creditActive = 1');
  24. }
  25. }