Esempio n. 1
0
 /**
  * @Route("/intent/{id}/show" , name="donate_admin_reporting_intent_show", defaults={"id" = 0})
  */
 public function intentShowAction(Request $request, Intent $intent)
 {
     $customerId = $intent->getCustomer()->getId();
     $entityMgr = $this->getDoctrine()->getManager();
     $paymentsQuery = $entityMgr->getRepository('DonateCoreBundle:Payment')->getPaymentsListByIntent(['intentId' => $intent->getId()]);
     $otherIntentsQuery = $entityMgr->getRepository('DonateCoreBundle:Intent')->getIntentsListByCustomer(['customerId' => $customerId], 5, $intent->getId());
     $otherIntents = $otherIntentsQuery->getResult();
     $pagination = $this->getPagination($request, $paymentsQuery, 12);
     return $this->render('DonateAdminBundle:Reporting:intentShow.html.twig', ['intent' => $intent, 'pagination' => $pagination, 'customerOtherIntents' => $otherIntents]);
 }