Controller/QuestionnaireController.php
public function replyAction()
    {
        $questionInteract = $this->get('qcm_core.question.interact');

        if (!$questionInteract->isStarted()) {
            $this->get('session')->getFlashBag()->add('danger', 'qcm_public.questionnaire.not_started');

            return $this->redirect($this->generateUrl('qcm_public_homepage'));
        }

        $question = $questionInteract->getQuestion();
        $formType = $this->get('qcm_core.form.type.reply');
        $form = $this->createForm($formType, $questionInteract->getUserConfiguration());

        return $this->render('QcmPublicBundle:Question:reply.html.twig', array(
            'question' => $question,
            'form' => $form->createView()
        ));
    }
public function replyAction()
    {
        $questionInteract = $this->get('qcm_core.question.interact');

        if (!$questionInteract->isStarted()) {
            $this->get('session')->getFlashBag()->add('danger', 'qcm_public.questionnaire.not_started');

            return $this->redirect($this->generateUrl('qcm_public_homepage'));
        }

        $question = $questionInteract->getQuestion();
        $formType = $this->get('qcm_core.form.type.reply');
        $form = $this->createForm($formType, $questionInteract->getUserConfiguration());

        return $this->render('QcmPublicBundle:Question:reply.html.twig', array(
            'question' => $question,
            'form' => $form->createView()
        ));
    }
public function replyAction ( ) { $ questionInteract = $ this -> get ( 'qcm_core.question.interact' ) ; if ( ! $ questionInteract -> isStarted ( ) ) { $ this -> get ( 'session' ) -> getFlashBag ( ) -> add ( 'danger' , 'qcm_public.questionnaire.not_started' ) ; return $ this -> redirect ( $ this -> generateUrl ( 'qcm_public_homepage' ) ) ; } $ question = $ questionInteract -> getQuestion ( ) ; $ formType = $ this -> get ( 'qcm_core.form.type.reply' ) ; $ form = $ this -> createForm ( $ formType , $ questionInteract -> getUserConfiguration ( ) ) ; return $ this -> render ( 'QcmPublicBundle:Question:reply.html.twig' , array ( 'question' => $ question , 'form' => $ form -> createView ( ) ) ) ; }
Question reply action

@return Response
Question reply action