Beispiel #1
0
 /**
  * @param $id
  * @param $status
  * @param $surveyName
  * @param $created
  * @param $description
  */
 function __construct($id, SurveyStatus $status, $surveyName, $created, $description)
 {
     $this->created = $created;
     $this->description = $description;
     $this->id = $id;
     $this->status = $status->getName();
     $this->surveyName = $surveyName;
     $this->action = '<a href="report.php?id=' . $id . '">View Report</a>';
     if ($status->getValue() == SurveyStatus::active) {
         $sid = SurveyStatus::disabled;
         $this->action .= " | <a href=\"changeStatus.php?id={$id}&status={$sid}\">Disable</a>";
     } else {
         $sid = SurveyStatus::active;
         $this->action .= " | <a href=\"changeStatus.php?id={$id}&status={$sid}\">Enable</a>";
     }
 }
Beispiel #2
0
 /**
  * @param SurveyStatus $status
  */
 public function setStatus(SurveyStatus $status)
 {
     $this->status = $status->getValue();
 }