コード例 #1
0
 public function deleteDisciplineAction(Request $request, Application $app)
 {
     $id_discipline = $request->request->get('id_discipline');
     $newDiscipline = new Discipline();
     $newDiscipline->setIdDiscipline($id_discipline);
     $app['dao.discipline']->deleteDiscipline($newDiscipline->getIdDiscipline());
     $app['session']->getFlashBag()->add('danger', 'Matière supprimée !');
     return $app->redirect($app['url_generator']->generate('disciplineslist'));
 }
コード例 #2
0
ファイル: DisciplineDAO.php プロジェクト: PPEagvn/ppe_gestion
 /**
  * @param $row
  * @return Discipline
  *
  * Construction de l'objet Discipline, la matière
  */
 protected function buildDomainObject($row)
 {
     $discipline = new Discipline();
     $discipline->setIdDiscipline($row['id_discipline']);
     $discipline->setNameDiscipline($row['name_discipline']);
     $discipline->setDescription($row['description']);
     $discipline->setDtCreate($row['dt_create']);
     $discipline->setDtUpdate($row['dt_update']);
     return $discipline;
 }