您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

25 行
697B

  1. <?php
  2. namespace Lc\CaracoleBundle\Repository\Reduction;
  3. use Knp\Component\Pager\PaginatorInterface;
  4. use Lc\CaracoleBundle\Repository\MerchantRepositoryQueryTrait;
  5. use Lc\SovBundle\Repository\AbstractRepositoryQuery;
  6. class ReductionCartRepositoryQuery extends AbstractRepositoryQuery
  7. {
  8. use MerchantRepositoryQueryTrait;
  9. public function __construct(ReductionCartRepository $repository, PaginatorInterface $paginator)
  10. {
  11. parent::__construct($repository, 'reductionCart', $paginator);
  12. }
  13. public function filterByCode(string $code)
  14. {
  15. return $this
  16. ->andWhere('.codes LIKE :code')
  17. ->setParameter('code', '%'.$code.'%') ;
  18. }
  19. }