Beispiel #1
0
 public function getElementAnswers($input)
 {
     $elementAnswers = array();
     if (!is_null($input)) {
         $elementAnswer = new \Jazzee\Entity\ElementAnswer();
         $elementAnswer->setElement($this->_element);
         $elementAnswer->setPosition(0);
         $elementAnswer->setEInteger($input);
         $elementAnswers[] = $elementAnswer;
     }
     return $elementAnswers;
 }
Beispiel #2
0
 public function getElementAnswers($input)
 {
     $elementAnswers = array();
     foreach ($input as $position => $value) {
         if (!empty($value)) {
             $elementAnswer = new \Jazzee\Entity\ElementAnswer();
             $elementAnswer->setElement($this->_element);
             $elementAnswer->setPosition($position);
             $elementAnswer->setEInteger($value);
             $elementAnswers[] = $elementAnswer;
         }
     }
     return $elementAnswers;
 }
Beispiel #3
0
 public function getElementAnswers($input)
 {
     $elementAnswers = array();
     if (!is_null($input)) {
         $fileHash = \Jazzee\Globals::getFileStore()->storeFile($input);
         $elementAnswer = new \Jazzee\Entity\ElementAnswer();
         $elementAnswer->setElement($this->_element);
         $elementAnswer->setPosition(0);
         $elementAnswer->setEShortString($fileHash);
         $elementAnswers[] = $elementAnswer;
         $elementAnswer = new \Jazzee\Entity\ElementAnswer();
         $elementAnswer->setElement($this->_element);
         $elementAnswer->setPosition(1);
         $elementAnswers[] = $elementAnswer;
     }
     return $elementAnswers;
 }