security = $security; } public function showAction(NotificationRepository $notificationRepository, NotificationRenderer $notificationRenderer) { $currentUser = $this->security->getUser(); $notifications = $notificationRepository->findAllForAttendee($currentUser); $templateData = array(); foreach ($notifications as $notification) { $data = [ 'template' => $notificationRenderer->getTemplate($notification), 'template_data' => $notificationRenderer->getTemplateData($notification), 'notification' => $notification ]; $templateData[] = $data; } return $this->render('ChillMainBundle:Notification:show.html.twig', [ 'datas' => $templateData, 'notifications' => $notifications, ]); } }