|
1234567891011121314151617181920212223242526272829303132 |
- <?php
-
- namespace Lc\CaracoleBundle\Repository\Reduction;
-
- use Knp\Component\Pager\PaginatorInterface;
- use Lc\CaracoleBundle\Model\Product\ProductFamilyInterface;
- use Lc\CaracoleBundle\Repository\MerchantRepositoryQueryTrait;
- use Lc\SovBundle\Repository\AbstractRepositoryQuery;
-
- class ReductionCatalogRepositoryQuery extends AbstractRepositoryQuery
- {
- use MerchantRepositoryQueryTrait;
-
- public function __construct(ReductionCatalogRepository $repository, PaginatorInterface $paginator)
- {
- parent::__construct($repository, 'r', $paginator);
- }
-
- public function filterProductFamily(ProductFamilyInterface $productFamily)
- {
- return $this
- ->andWhere('.productFamily = :productFamily')
- ->setParameter(':productFamily', $productFamily);
- }
-
- public function filterStatus(bool $status)
- {
- return $this
- ->andWhere('.status = :status')
- ->setParameter(':status', $status);
- }
- }
|