public function render($idLang) { $row = new RM_View_Form_Row(); $row->setDesc($this->getDesc()); $row->setHTML($this->getView()->partial(static::BASE_PATH . static::TPL, $this->addFieldData($idLang, array('isLinked' => $this->_accessToken instanceof Application_Model_Api_Google_AccessToken, 'linkUrl' => $this->_client ? $this->_client->createAuthUrl() : '', 'unlinkUrl' => $this->getView()->url(['idDoctor' => $this->_doctor->getId()], 'admin-unlink-google-account'))))); return $this->renderRow($row); }
public function getFormattedPosts() { $posts = $this->_doctor->getPosts(); foreach ($posts as &$post) { $post = $post->getName(); } return join(', ', $posts); }
private function _serializeServices() { $services = []; foreach ($this->_doctor->getServices() as $service) { $services[] = $service->getId(); } return $services; }
public function isAvailable(DateTime $from, DateTime $to = null, array $excludeReservations = array()) { if (!$to) { $to = clone $from; $to->addSeconds($this->_doctor->getMinReceptionDuration()->getTimestamp()); } if (!$this->isWorkingAt($from) || !$this->isWorkingAt($to)) { return false; } return !$this->_reservationService->hasReservationsBetween($from, $to, $excludeReservations); }
public function getDoctor() { if (!$this->_doctor && $this->getIdDoctor()) { $this->_doctor = Doctor::getById($this->getIdDoctor()); } return $this->_doctor; }
private function _saveEntity() { $this->_entity->save(); if (!$this->_workTimeService) { $this->_workTimeService = new MedOptima_Service_Doctor_WorkTime(); } $this->_workTimeService->saveList($this->_workTimeList); }
private function _prepareServices() { $selectedServices = isset($this->_data->selectedServices) ? $this->_data->selectedServices : array(); if (!is_array($selectedServices)) { $selectedServices = array(); } if (!empty($selectedServices)) { foreach ($this->_doctor->getServices() as $service) { if (in_array($service->getId(), $selectedServices)) { $this->_services[] = $service; } } } }
public function getFrom() { return Application_Model_Medical_Doctor::getById($this->getIdFrom()); }
public function setDoctor(Doctor $doctor) { $this->_doctor = $doctor; $this->__setIdDoctor($doctor->getId()); }
private function _redirectToDoctorEdit() { $this->redirect($this->view->url(['id' => $this->_doctor->getId(), 'page' => 1], 'admin-medical-doctor-edit')); }
public function setDoctor(Application_Model_Medical_Doctor $doctor) { $this->_getWhere()->add('idDoctor', '=', $doctor->getId()); }
protected function __setData(stdClass $data) { $this->__setContentFields(); $this->_entity->setDoctorResponse($data->response); $this->_entity->setVisitorQuestion($data->question); $this->_entity->setVisitorName($data->visitor_name); $this->_entity->setVisitorEmail($data->visitor_email); $doctor = Application_Model_Medical_Doctor::getById($data->id_doctor); if ($doctor instanceof Application_Model_Medical_Doctor) { $this->_entity->setDoctor($doctor); } else { $this->_entity->resetDoctor(); } $this->_entity->setShownOnMain($data->shown_on_main); }
public function setDoctor(Doctor $doctor) { $this->_getWhere()->add('idDoctor', '=', $doctor->getId()); }