Beispiel #1
0
 /**
  * @param \ConsultBundle\Entity\DoctorConsultSettings $doctorConsultSettings
  *
  * @return \ConsultBundle\Entity\DoctorEntity|null
  */
 public static function getEntityFromConsultSettings(DoctorConsultSettings $doctorConsultSettings)
 {
     if (empty($doctorConsultSettings)) {
         return null;
     }
     $doctorEntity = new DoctorEntity();
     $doctorEntity->setName($doctorConsultSettings->getName());
     $doctorEntity->setProfilePicture($doctorConsultSettings->getProfilePicture());
     $doctorEntity->setSpeciality($doctorConsultSettings->getSpeciality());
     $doctorEntity->setFabricId($doctorConsultSettings->getFabricDoctorId());
     $doctorEntity->setActivated($doctorConsultSettings->isActivated());
     return $doctorEntity;
 }
 /**
  * @param array $doctorQuestion
  */
 public function setDoctorFromAttributes(array $doctorQuestion)
 {
     if (!empty($doctorQuestion)) {
         $doc = new DoctorEntity();
         $doc->setName($doctorQuestion['name']);
         $doc->setSpeciality($doctorQuestion['speciality']);
         $doc->setProfilePicture($doctorQuestion['profilePicture']);
         $doc->setFabricId($doctorQuestion['doctorId']);
         $doc->setActivated($doctorQuestion['activated']);
         $this->setDoctor($doc);
     }
 }