Esempio n. 1
0
 private function _process(Google_Event $event)
 {
     $event->setSummary($this->_getReservationSummary());
     $event->setDescription($this->_getReservationDescription());
     $timeBegin = DateTime::createFromTimestamp($this->_reservation->getFinalVisitTime());
     $timeEnd = DateTime::createFromTimestamp($this->_reservation->getVisitEndTime());
     $timeEventBegin = new Google_EventDateTime();
     $timeEventEnd = new Google_EventDateTime();
     $timeEventBegin->setDateTime($timeBegin->getGoogleApiDatetime());
     $timeEventEnd->setDateTime($timeEnd->getGoogleApiDatetime());
     $event->setStart($timeEventBegin);
     $event->setEnd($timeEventEnd);
     return $event;
 }
 public function __postFields()
 {
     $_POST['status'] = $this->_entity->getStatus();
     $_POST['doctor'] = $this->_entity->getDoctor() ? $this->_entity->getDoctor()->getName() : 'DELETED';
     $_POST['visitor_name'] = $this->_entity->getVisitorName();
     $_POST['visitor_phone'] = $this->_entity->getVisitorPhone();
     $_POST['create_time'] = DateTime::createFromTimestamp($this->_entity->getCreateTime())->getGostDatetime();
     $_POST['desired_visit_time'] = DateTime::createFromTimestamp($this->_entity->getDesiredVisitTime())->getGostDatetime();
     $_POST['final_visit_time'] = DateTime::createFromTimestamp($this->_entity->getFinalVisitTime())->getGostDatetime();
     $_POST['visit_end_time'] = DateTime::createFromTimestamp($this->_entity->getVisitEndTime())->getGostDatetime();
     $_POST['id_services'] = array_map(function (Application_Model_Medical_Service $service) {
         return $service->getId();
     }, $this->_entity->getServices());
     $this->view->assign(array('reservation' => $this->_entity, 'services' => $this->_entity->getDoctor()->getServices()));
 }