public function getAllUserPaymentsQueryBuilder(\Almo\UserBundle\Entity\Users $user) { $qb = $this->getEntityManager()->createQueryBuilder()->select('p')->from('Almo\\WalletBundle\\Entity\\Payments', 'p')->join('p.accountId', 'a')->join('p.operationId', 'o')->where('a.userId = :userId')->orderBy('o.date', 'DESC')->setParameter('userId', $user->getId()); return $qb; }
public function getUserTags(\Almo\UserBundle\Entity\Users $User, $type) { $query = $this->getEntityManager()->createQuery("SELECT t FROM Almo\\WalletBundle\\Entity\\Tags t\n\t\t\t\t\t\t\tWHERE t.userId = :userId and t.payType = :type")->setParameter('userId', $User->getId())->setParameter('type', $type); return $query->getResult(); }