|  | @@ 106-112 (lines=7) @@ | 
                                                            
                                    | 103 |  |         $form = $this->createForm(\AppBundle\Form\SurveyType::class, $survey); | 
                                                            
                                    | 104 |  |         $form->handleRequest($request); | 
                                                            
                                    | 105 |  |  | 
                                                            
                                    | 106 |  |         if ($form->isSubmitted() && $form->isValid()) { | 
                                                            
                                    | 107 |  |             $em = $this->getDoctrine()->getManager(); | 
                                                            
                                    | 108 |  |             $em->persist($survey); | 
                                                            
                                    | 109 |  |             $em->flush(); | 
                                                            
                                    | 110 |  |  | 
                                                            
                                    | 111 |  |             return $this->redirectToRoute('surveys'); | 
                                                            
                                    | 112 |  |         } | 
                                                            
                                    | 113 |  |  | 
                                                            
                                    | 114 |  |         return $this->render('@App/surveyform.html.twig', array( | 
                                                            
                                    | 115 |  |             'form' => $form->createView(), | 
                                                                                
                                |  | @@ 141-147 (lines=7) @@ | 
                                                            
                                    | 138 |  |         $form = $this->createForm(\AppBundle\Form\SurveyType::class, $survey); | 
                                                            
                                    | 139 |  |         $form->handleRequest($request); | 
                                                            
                                    | 140 |  |  | 
                                                            
                                    | 141 |  |         if ($form->isSubmitted() && $form->isValid()) { | 
                                                            
                                    | 142 |  |             $em = $this->getDoctrine()->getManager(); | 
                                                            
                                    | 143 |  |             $em->remove($survey); | 
                                                            
                                    | 144 |  |             $em->flush(); | 
                                                            
                                    | 145 |  |  | 
                                                            
                                    | 146 |  |             return $this->redirectToRoute('surveys'); | 
                                                            
                                    | 147 |  |         } | 
                                                            
                                    | 148 |  |  | 
                                                            
                                    | 149 |  |         return $this->render('@App/survey.html.twig', array( | 
                                                            
                                    | 150 |  |             'form' => $form->createView(), 'survey' => $survey, 'question_answers' => $questionAnswer, |