コード例 #1
0
ファイル: ezsurvey.php プロジェクト: heliopsis/ezsurvey
 function &fetchQuestionList()
 {
     if ($this->QuestionList === null) {
         $rows = eZPersistentObject::fetchObjectList(eZSurveyQuestion::definition(), null, array('survey_id' => $this->ID), array('tab_order' => 'asc'), null, false);
         $objects = array();
         $this->QuestionList = array();
         $questionIterator = 1;
         if (count($rows) > 0) {
             foreach ($rows as $row) {
                 $classname = implode('', array('eZSurvey', $row['type']));
                 if (class_exists($classname) === true) {
                     $newObject = new $classname($row);
                     $newObject->questionNumberIterate($questionIterator);
                     $newObjectID = $newObject->attribute('id');
                     $this->QuestionList[$newObjectID] = $newObject;
                 }
             }
         }
     }
     return $this->QuestionList;
 }
コード例 #2
0
 static function definition()
 {
     $def = parent::definition();
     $def['function_attributes']['email_sender_list'] = 'emailSenderList';
     return $def;
 }
コード例 #3
0
 static function definition()
 {
     return array_merge_recursive(array('function_attributes' => array('content' => 'xmlOutput')), eZSurveyQuestion::definition());
 }
コード例 #4
0
 static function definition()
 {
     $def = parent::definition();
     $def['function_attributes']['multiple_choice_answers'] = 'multipleChoiceAnswers';
     return $def;
 }
コード例 #5
0
 static function fetch($id, $asObject = true)
 {
     $surveyQuestionObject = eZPersistentObject::fetchObject(eZSurveyQuestion::definition(), null, array('id' => $id), $asObject);
     return $surveyQuestionObject;
 }