|
|
|
|
|
|
|
|
return $this->createQueryBuilder('e') |
|
|
return $this->createQueryBuilder('e') |
|
|
->where(':newsletter MEMBER OF e.newsletters') |
|
|
->where(':newsletter MEMBER OF e.newsletters') |
|
|
->setParameter('newsletter', $newsletter->getId()) |
|
|
->setParameter('newsletter', $newsletter->getId()) |
|
|
->andWhere('e.enabled = 1') |
|
|
|
|
|
->innerJoin('e.userMerchants', 'um') |
|
|
->innerJoin('e.userMerchants', 'um') |
|
|
->andWhere('um.merchant = :merchant AND um.active = 1') |
|
|
->andWhere('um.merchant = :merchant AND um.active = 1') |
|
|
->setParameter('merchant', $newsletter->getMerchant()) |
|
|
->setParameter('merchant', $newsletter->getMerchant()) |