/** * * Save the final status of the form. * The status is saved in the formEntity * It saves two datas : * - Status (static value of this utils class) * - Log message * * @param $status */ public function saveTestStatus($status, $log, Form $form) { $form->setTestStatus($status); $form->setTestLog($log); $em = $this->getDoctrine()->getManager(); $em->persist($form); $em->flush(); }