/** * returns list of questionDefinitions * @param Poll $poll * @return array */ public function getQuestionDefinitions(Poll $poll) { return $this->questionDefinitionRepository->getQuestionDefinitions($poll->getPollDefinition()); }
/** * informs that the poll was completed * @param Poll $poll * @return Response * @throws \Exception * @throws \Twig_Error * @Route("/poll/{poll}/success" , name="poll_success") * @Method("GET") * @Security("has_role('ROLE_POLLSTER')") */ public function successAction(Poll $poll) { $html = $this->container->get('templating')->render('answer/success.html.twig', ['pollDefinition' => $poll->getPollDefinition()]); return new Response($html); }