|
- <?php
-
- namespace Lc\ShopBundle\Repository;
-
- use Lc\ShopBundle\Context\DefaultRepositoryInterface;
- use Lc\ShopBundle\Context\UserInterface;
-
-
- class UserRepository extends BaseRepository implements DefaultRepositoryInterface
- {
- public function getInterfaceClass()
- {
- return UserInterface::class;
- }
-
- public function findAllByNewsletter($newsletter)
- {
- return $this->createQueryBuilder('e')
- ->where(':newsletter MEMBER OF e.newsletters')
- ->setParameter('newsletter', $newsletter->getId())
- ->getQuery()
- ->getResult() ;
- }
-
- }
|