|
- <?php
-
- namespace Lc\PietroBundle\Repository\Workshop;
-
- use Knp\Component\Pager\PaginatorInterface;
- use Lc\PietroBundle\Model\Workshop\WorkshopInterface;
- use Lc\SovBundle\Repository\AbstractRepositoryQuery;
-
- class EntryRepositoryQuery extends AbstractRepositoryQuery
- {
- public function __construct(EntryRepository $repository, PaginatorInterface $paginator)
- {
- parent::__construct($repository, 'workshopEntry', $paginator);
- }
-
- public function filterByEmail(string $email)
- {
- return $this->andWhere('.email LIKE :email')
- ->setParameter('email', $email);
- }
-
- public function filterByWorkshop(WorkshopInterface $workshop)
- {
- return $this->andWhereEqual('workshop', $workshop);
- }
- }
|