コード例 #1
0
 /**
  * @param Job $job
  *
  * @return Model;
  */
 public function entityToModel(Job $job)
 {
     $model = new Model();
     $model->setId($job->getId())->setCode($job->getCode())->setTitle($job->getTitle())->setActive($job->isActive());
     if ($this->isModeFull()) {
         $model->setStartTime($job->getStartTime())->setEndTime($job->getEndTime())->setDuration($job->getDuration());
     }
     return $model;
 }