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.

27 lines
748B

  1. <?php
  2. namespace Lc\PietroBundle\Repository\Workshop;
  3. use Knp\Component\Pager\PaginatorInterface;
  4. use Lc\PietroBundle\Model\Workshop\WorkshopInterface;
  5. use Lc\SovBundle\Repository\AbstractRepositoryQuery;
  6. class EntryRepositoryQuery extends AbstractRepositoryQuery
  7. {
  8. public function __construct(EntryRepository $repository, PaginatorInterface $paginator)
  9. {
  10. parent::__construct($repository, 'workshopEntry', $paginator);
  11. }
  12. public function filterByEmail(string $email)
  13. {
  14. return $this->andWhere('.email LIKE :email')
  15. ->setParameter('email', $email);
  16. }
  17. public function filterByWorkshop(WorkshopInterface $workshop)
  18. {
  19. return $this->andWhereEqual('workshop', $workshop);
  20. }
  21. }