/** * @param TblProspectAppointment $tblProspectAppointment * @param string $ReservationDate * @param string $InterviewDate * @param string $TrialDate * * @return TblProspectAppointment */ public function updateProspectAppointment(TblProspectAppointment $tblProspectAppointment, $ReservationDate, $InterviewDate, $TrialDate) { $Manager = $this->Connection->getEntityManager(); /** @var null|TblProspectAppointment $Entity */ $Entity = $Manager->getEntityById('TblProspectAppointment', $tblProspectAppointment->getId()); if (null !== $Entity) { $Protocol = clone $Entity; $Entity->setReservationDate($ReservationDate ? new \DateTime($ReservationDate) : null); $Entity->setInterviewDate($InterviewDate ? new \DateTime($InterviewDate) : null); $Entity->setTrialDate($TrialDate ? new \DateTime($TrialDate) : null); $Manager->saveEntity($Entity); Protocol::useService()->createUpdateEntry($this->Connection->getDatabase(), $Protocol, $Entity); return true; } return false; }
/** * @param null|TblProspectAppointment $tblProspectAppointment */ public function setTblProspectAppointment(TblProspectAppointment $tblProspectAppointment = null) { $this->tblProspectAppointment = null === $tblProspectAppointment ? null : $tblProspectAppointment->getId(); }