public function show($elemId = '', $questionType = null, $langId = 1, $elemSeq = null) { $question = array(); if ($elemId != '') { $question = $this->_selectQuestions($elemId, $langId); if (empty($question)) { $question = $this->_selectQuestions($elemId, Cible_Controller_Action::getDefaultEditLanguage()); } $questionType = $question[0]['FQ_TypeID']; $className = 'Question' . $question[0]['FQT_TypeName'] . 'Object'; $oQuestion = new $className(); $html = '<li questiontype="text" elementtype="question" class="element element_question section_element_question_li" style="display: list-item;" id="element_' . $elemId . '">'; $html .= $oQuestion->showQuestion($question, $elemId, $elemSeq, null, $langId); $html .= "</li>"; } elseif ($questionType != null) { $oQuestTyp = new FormQuestionTypeObject(); $types = $oQuestTyp->populate($questionType, $langId); $className = 'Question' . $types['FQT_TypeName'] . 'Object'; $oQuestion = new $className(); $html = $oQuestion->showQuestion($question, $elemId, $elemSeq, $types, $langId); } return $html; }