public function getFormattedPosts() { $posts = $this->_doctor->getPosts(); foreach ($posts as &$post) { $post = $post->getName(); } return join(', ', $posts); }
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(); }