|
12345678910111213141516171819202122232425262728 |
- <?php
-
- namespace Lc\CaracoleBundle\Repository\Section;
-
- use Knp\Component\Pager\PaginatorInterface;
- use Lc\CaracoleBundle\Repository\SectionRepositoryQueryTrait;
- use Lc\SovBundle\Repository\AbstractRepositoryQuery;
-
- class OpeningRepositoryQuery extends AbstractRepositoryQuery
- {
- use SectionRepositoryQueryTrait;
-
- public function __construct(OpeningRepository $repository, PaginatorInterface $paginator)
- {
- parent::__construct($repository, 'opening', $paginator);
- }
-
- public function filterByToday()
- {
- return $this->filterByDay(date('N'));
- }
-
- public function filterByDay(int $day)
- {
- return $this->andWhereEqual('day', $day);
- }
-
- }
|