|
12345678910111213141516171819202122232425262728293031 |
- <?php
-
- namespace Lc\CaracoleBundle\Repository\Distribution;
-
- use Knp\Component\Pager\PaginatorInterface;
- use Lc\CaracoleBundle\Repository\SectionRepositoryQueryTrait;
- use Lc\SovBundle\Repository\AbstractRepositoryQuery;
-
- class DistributionRepositoryQuery extends AbstractRepositoryQuery
- {
- use SectionRepositoryQueryTrait;
-
- public function __construct(DistributionRepository $repository, PaginatorInterface $paginator)
- {
- parent::__construct($repository, 'd', $paginator);
- }
-
- public function filterByYear(int $year): self
- {
- return $this
- ->andWhere('.year = :year')
- ->setParameter('year', $year);
- }
-
- public function filterByCycleNumber(int $cycleNumber): self
- {
- return $this
- ->andWhere('.cycleNumber = :cycleNumber')
- ->setParameter('cycleNumber', $cycleNumber);
- }
- }
|