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.

33 satır
988B

  1. <?php
  2. namespace Lc\CaracoleBundle\Repository\Reduction;
  3. use Knp\Component\Pager\PaginatorInterface;
  4. use Lc\CaracoleBundle\Model\Product\ProductFamilyInterface;
  5. use Lc\CaracoleBundle\Repository\MerchantRepositoryQueryTrait;
  6. use Lc\SovBundle\Repository\AbstractRepositoryQuery;
  7. class ReductionCatalogRepositoryQuery extends AbstractRepositoryQuery
  8. {
  9. use MerchantRepositoryQueryTrait;
  10. public function __construct(ReductionCatalogRepository $repository, PaginatorInterface $paginator)
  11. {
  12. parent::__construct($repository, 'r', $paginator);
  13. }
  14. public function filterProductFamily(ProductFamilyInterface $productFamily)
  15. {
  16. return $this
  17. ->andWhere('.productFamily = :productFamily')
  18. ->setParameter(':productFamily', $productFamily);
  19. }
  20. public function filterStatus(bool $status)
  21. {
  22. return $this
  23. ->andWhere('.status = :status')
  24. ->setParameter(':status', $status);
  25. }
  26. }