public function deleteExamenAction(Request $request, Application $app) { $id_examen = $request->request->get('id_examen'); $newExamen = new Examen(); $newExamen->setIdExamen($id_examen); $app['dao.examen']->deleteExamen($newExamen->getIdExamen()); return $this::deleteExamenIndexAction($request, $app); }
protected function buildDomainObject($row) { $exam = new Examen(); $exam->setIdExamen($row['id_examen']); $exam->setExamenName($row['examen_name']); $exam->setCoeffExamen($row['coeff_examen']); $exam->setNotation($row['notation']); $exam->setDateExamen($row['date']); $exam->setDescriptionExamen($row['description']); $exam->setSemestre($row['semestre']); $exam->setDtCreate($row['dt_create']); $exam->setDtUpdate($row['dt_update']); if (array_key_exists('id_class', $row)) { $classID = $row['id_class']; $class = $this->classDAO->findClassname($classID); $exam->setClass($class); } if (array_key_exists('id_discipline', $row)) { $disciplineID = $row['id_discipline']; $discipline = $this->disciplineDAO->findDiscipline($disciplineID); $exam->setDiscipline($discipline); } return $exam; }