Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

29 lines
691B

  1. <?php
  2. namespace Lc\CaracoleBundle\Repository\Section;
  3. use Knp\Component\Pager\PaginatorInterface;
  4. use Lc\CaracoleBundle\Repository\SectionRepositoryQueryTrait;
  5. use Lc\SovBundle\Repository\AbstractRepositoryQuery;
  6. class OpeningRepositoryQuery extends AbstractRepositoryQuery
  7. {
  8. use SectionRepositoryQueryTrait;
  9. public function __construct(OpeningRepository $repository, PaginatorInterface $paginator)
  10. {
  11. parent::__construct($repository, 'opening', $paginator);
  12. }
  13. public function filterByToday()
  14. {
  15. return $this->filterByDay(date('N'));
  16. }
  17. public function filterByDay(int $day)
  18. {
  19. return $this->andWhereEqual('day', $day);
  20. }
  21. }