Exemplo n.º 1
0
 /**
  * @param $classId
  * @throws \Doctrine\DBAL\Exception\InvalidArgumentException
  *
  * Fonction de mise à jour de la clé étrangère de la classe
  */
 public function deleteAllByClass($classId, Student $student)
 {
     $studentInfo = array('student_name' => $student->getName(), 'student_firstname' => $student->getFirstname(), 'student_birthday' => $student->getBirthday(), 'student_email' => $student->getEmail(), 'student_address' => $student->getAddress(), 'student_tel' => $student->getTel(), 'dt_create' => $student->getDtCreate(), 'dt_update' => $student->getDtUpdate(), 'id_class' => $student->getClass()->getIdClassName(), 'id_statut' => $student->getStatut()->getId());
     $this->getDb()->update('student', $studentInfo, array('id_student' => $classId));
 }