/**
  * @param \ConsultBundle\Entity\DoctorQuestion $doctorQuestion
  */
 public function __construct(DoctorQuestion $doctorQuestion)
 {
     if (!empty($doctorQuestion)) {
         $question = $doctorQuestion->getQuestion();
         parent::__construct($question);
         $this->setId($doctorQuestion->getId());
         $this->setState($doctorQuestion->getState());
         $this->setHasImages($question->getImages()->count());
         $reply = $doctorQuestion->getDoctorReplies();
         if (!empty($reply) && !$reply->isSoftDeleted()) {
             $rating = $doctorQuestion->getDoctorReplies()->getRating();
             $this->setRating($rating);
         }
     }
 }
 /**
  * @param \ConsultBundle\Entity\Question $question
  * @param null                           $practoAccountId
  */
 public function __construct(Question $question, $practoAccountId = null)
 {
     parent::__construct($question);
     $this->populatePatientInfo($question->getUserInfo(), $practoAccountId);
 }
Exemplo n.º 3
0
 private static function mapBasicQuestion(Question $questionEntity, BasicQuestionResponseObject $question)
 {
     $question->setId($questionEntity->getId());
     $question->setSpeciality($questionEntity->getSpeciality());
     $question->setViewCount($questionEntity->getViewCount());
     $question->setShareCount($questionEntity->getSpeciality());
     $question->setSubject($questionEntity->getSubject());
     $question->setText($questionEntity->getText());
     $question->setModifiedAt($questionEntity->getModifiedAt());
     $question->setCreatedAt($questionEntity->getCreatedAt());
     $question->setCreatedAt($questionEntity->getCreatedAt());
 }