|
|
|
|
|
|
|
|
$query->andWhere('e.status = 1'); |
|
|
$query->andWhere('e.status = 1'); |
|
|
$query->andWhere('e.type = :type'); |
|
|
$query->andWhere('e.type = :type'); |
|
|
$query->andWhere(':user MEMBER OF e.users'); |
|
|
$query->andWhere(':user MEMBER OF e.users'); |
|
|
|
|
|
$query->andWhere(':now > e.activationDate'); |
|
|
|
|
|
$query->setParameter('now', new \DateTime()) ; |
|
|
|
|
|
|
|
|
$query->setParameter('user', $user); |
|
|
$query->setParameter('user', $user); |
|
|
$query->setParameter('type', ReductionCredit::TYPE_GIFT); |
|
|
$query->setParameter('type', ReductionCredit::TYPE_GIFT); |
|
|
return $query->getQuery()->getResult() ; |
|
|
return $query->getQuery()->getResult() ; |