Exemplo n.º 1
0
 private function _serializeServices()
 {
     $services = [];
     foreach ($this->_doctor->getServices() as $service) {
         $services[] = $service->getId();
     }
     return $services;
 }
Exemplo n.º 2
0
 public function __postFields()
 {
     $this->__postContentFields();
     $_POST['id_photo'] = $this->_entity->getIdPhoto();
     $_POST['id_posts'] = array_map(function (Application_Model_Medical_Post $post) {
         return $post->getId();
     }, $this->_entity->getPosts());
     $_POST['id_services'] = array_map(function (Application_Model_Medical_Service $service) {
         return $service->getId();
     }, $this->_entity->getServices());
     $_POST['work_time_list'] = (new MedOptima_Service_Doctor_WorkTime())->listToArray($this->_entity->getWorkTimeList());
     $_POST['id_user'] = $this->_entity->getIdUser();
     $_POST['reception_duration'] = $this->_entity->getReceptionDuration()->getTimestamp();
 }
Exemplo n.º 3
0
 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;
             }
         }
     }
 }