/data/webdev/master/application/models/services/ThemeQuestionAttributeProvider.php(46)
34 * @param string $questionType the extended typ (see table question_themes "extends") 35 * @return array<string,array> additional attributes for an extended theme or empty array 36 */ 37 protected function getAttributesFromQuestionTheme($questionThemeName, $questionType) 38 { 39 /** @var array<string,array> An array of question attributes */ 40 $attributes = array(); 41 42 $questionTheme = \QuestionTheme::model()->findByAttributes([], 'name = :name AND extends = :extends', ['name' => $questionThemeName, 'extends' => $questionType]); 43 if ($questionTheme !== null) { 44 $xmlFilePath = $questionTheme['xml_path'] . '/config.xml'; 45 $extensionConfig = \ExtensionConfig::loadFromFile($xmlFilePath); 46 $xmlAttributes = $extensionConfig->getNodeAsArray('attributes'); 47 } 48 49 if (!empty($xmlAttributes)) { 50 if (!empty($xmlAttributes['attribute']['name'])) { 51 // Only one attribute set in config: need an array of attributes 52 $xmlAttributes['attribute'] = array($xmlAttributes['attribute']); 53 } 54 // Create array of attribute with name as key 55 foreach ($xmlAttributes['attribute'] as $attribute) { 56 if (!empty($attribute['name'])) { 57 $attributes[$attribute['name']] = array_merge(self::getBaseDefinition(), $attribute); 58 }
#0 |
+
–
/data/webdev/master/application/models/services/ThemeQuestionAttributeProvider.php(26): LimeSurvey\Models\Services\ThemeQuestionAttributeProvider->getAttributesFromQuestionTheme() 21 $questionType = self::getQuestionType($options); 22 if (empty($questionType)) { 23 return []; 24 } 25 26 return $this->getAttributesFromQuestionTheme($questionTheme, $questionType); 27 } 28 29 /** 30 * Gets the additional attributes for an extended theme from xml file. 31 * If there are no attributes, an empty array is returned |
#1 |
+
–
/data/webdev/master/application/models/services/QuestionAttributeFetcher.php(52): LimeSurvey\Models\Services\ThemeQuestionAttributeProvider->getDefinitions() 47 $allAttributes = []; 48 49 // We retrieve the attributes from each provider, sanitize them, and merge them. 50 foreach ($this->providers as $provider) { 51 $options = array_merge($this->options, ['question' => $this->question]); 52 $attributes = $provider->getDefinitions($options); 53 $sanitizedAttributes = $questionAttributeHelper->sanitizeQuestionAttributes($attributes); 54 $allAttributes = $questionAttributeHelper->mergeQuestionAttributes($allAttributes, $sanitizedAttributes); 55 } 56 57 // Sort by category |
#2 |
+
–
/data/webdev/master/application/models/services/QuestionAttributeHelper.php(216): LimeSurvey\Models\Services\QuestionAttributeFetcher->fetch() 211 $questionAttributeFetcher->setAdvancedOnly($advancedOnly); 212 if (!empty($questionThemeOverride)) { 213 $questionAttributeFetcher->setTheme($questionThemeOverride); 214 } 215 216 $questionAttributeDefinitions = $questionAttributeFetcher->fetch(); 217 $questionAttributesWithValues = $questionAttributeFetcher->populateValues($questionAttributeDefinitions, $language); 218 219 return $questionAttributesWithValues; 220 } 221 |
#3 |
+
–
/data/webdev/master/application/models/Question.php(299): LimeSurvey\Models\Services\QuestionAttributeHelper->getQuestionAttributesWithValues() 294 * @return array 295 */ 296 public function getAdvancedSettingsWithValues($sLanguage = null, $sQuestionThemeOverride = null) 297 { 298 $questionAttributeHelper = new LimeSurvey\Models\Services\QuestionAttributeHelper(); 299 $aAttributes = $questionAttributeHelper->getQuestionAttributesWithValues($this, $sLanguage, $sQuestionThemeOverride, true); 300 return $aAttributes; 301 } 302 303 /** 304 * Add custom attributes (if there are any custom attributes). It also removes all attributeNames where inputType is |
#4 |
+
–
/data/webdev/master/application/controllers/QuestionAdministrationController.php(2382): Question->getAdvancedSettingsWithValues() 2377 { 2378 //here we get a Question object (also if question is new --> QuestionCreate) 2379 $oQuestion = $this->getQuestionObject($iQuestionId, $sQuestionType, null, $sQuestionTheme); 2380 2381 // Get the advanced settings array 2382 $advancedSettings = $oQuestion->getAdvancedSettingsWithValues(); 2383 2384 // Group the array in categories 2385 $questionAttributeHelper = new LimeSurvey\Models\Services\QuestionAttributeHelper(); 2386 $advancedSettings = $questionAttributeHelper->groupAttributesByCategory($advancedSettings); 2387 |
#5 |
+
–
/data/webdev/master/application/controllers/QuestionAdministrationController.php(190): QuestionAdministrationController->getAdvancedOptions() 185 $this->aData['sidemenu']['landOnSideMenuTab'] = 'structure'; 186 $this->aData['title_bar']['title'] = 187 $question->survey->currentLanguageSettings->surveyls_title 188 . " (" . gT("ID") . ":" . $question->sid . ")"; 189 $this->aData['aQuestionTypeList'] = QuestionTheme::findAllQuestionMetaDataForSelector(); 190 $advancedSettings = $this->getAdvancedOptions($question->qid, $question->type, $question->question_theme_name); 191 // Remove general settings from this array. 192 unset($advancedSettings['Attribute']); 193 194 // Add <input> with JSON as value, used by JavaScript. 195 $jsVariablesHtml = $this->renderPartial( |
#6 |
+
–
/data/webdev/master/application/controllers/QuestionAdministrationController.php(150): QuestionAdministrationController->renderFormAux() 145 'qid' => $question->qid, 146 'landOnSideMenuTab' => 'structure' 147 ] 148 ); 149 $this->aData['tabOverviewEditor'] = $tabOverviewEditor; 150 $this->renderFormAux($question); 151 } 152 153 /** 154 * Helper function to render form. 155 * Used by create and edit actions. |
#7 |
+
–
/data/webdev/master/application/controllers/QuestionAdministrationController.php(70): QuestionAdministrationController->actionEdit() 65 * 66 * @throws CException 67 */ 68 public function actionView($surveyid, $gid = null, $qid = null, $landOnSideMenuTab = 'structure') 69 { 70 $this->actionEdit($qid); 71 } 72 73 /** 74 * Show form to create new question. 75 * |
#8 |
unknown(0): QuestionAdministrationController->actionView()
|
#9 |
+
–
/data/webdev/master/framework/web/actions/CAction.php(115): ReflectionMethod->invokeArgs() 110 elseif($param->isDefaultValueAvailable()) 111 $ps[]=$param->getDefaultValue(); 112 else 113 return false; 114 } 115 $method->invokeArgs($object,$ps); 116 return true; 117 } 118 } |
#10 |
+
–
/data/webdev/master/framework/web/actions/CInlineAction.php(47): CAction->runWithParamsInternal() 42 { 43 $methodName='action'.$this->getId(); 44 $controller=$this->getController(); 45 $method=new ReflectionMethod($controller, $methodName); 46 if($method->getNumberOfParameters()>0) 47 return $this->runWithParamsInternal($controller, $method, $params); 48 49 $controller->$methodName(); 50 return true; 51 } 52 } |
#11 |
+
–
/data/webdev/master/framework/web/CController.php(308): CInlineAction->runWithParams() 303 { 304 $priorAction=$this->_action; 305 $this->_action=$action; 306 if($this->beforeAction($action)) 307 { 308 if($action->runWithParams($this->getActionParams())===false) 309 $this->invalidActionParams($action); 310 else 311 $this->afterAction($action); 312 } 313 $this->_action=$priorAction; |
#12 |
+
–
/data/webdev/master/framework/web/CController.php(286): CController->runAction() 281 * @see runAction 282 */ 283 public function runActionWithFilters($action,$filters) 284 { 285 if(empty($filters)) 286 $this->runAction($action); 287 else 288 { 289 $priorAction=$this->_action; 290 $this->_action=$action; 291 CFilterChain::create($this,$action,$filters)->run(); |
#13 |
+
–
/data/webdev/master/framework/web/CController.php(265): CController->runActionWithFilters() 260 { 261 if(($parent=$this->getModule())===null) 262 $parent=Yii::app(); 263 if($parent->beforeControllerAction($this,$action)) 264 { 265 $this->runActionWithFilters($action,$this->filters()); 266 $parent->afterControllerAction($this,$action); 267 } 268 } 269 else 270 $this->missingAction($actionID); |
#14 |
+
–
/data/webdev/master/application/controllers/LSBaseController.php(160): CController->run() 155 $this->redirect(array('/admin/authentication/sa/login')); 156 } 157 } 158 } 159 160 parent::run($action); 161 } 162 163 /** 164 * Load and set session vars 165 * |
#15 |
+
–
/data/webdev/master/framework/web/CWebApplication.php(282): LSBaseController->run() 277 { 278 list($controller,$actionID)=$ca; 279 $oldController=$this->_controller; 280 $this->_controller=$controller; 281 $controller->init(); 282 $controller->run($actionID); 283 $this->_controller=$oldController; 284 } 285 else 286 throw new CHttpException(404,Yii::t('yii','Unable to resolve the request "{route}".', 287 array('{route}'=>$route===''?$this->defaultController:$route))); |
#16 |
+
–
/data/webdev/master/framework/web/CWebApplication.php(141): CWebApplication->runController() 136 foreach(array_splice($this->catchAllRequest,1) as $name=>$value) 137 $_GET[$name]=$value; 138 } 139 else 140 $route=$this->getUrlManager()->parseUrl($this->getRequest()); 141 $this->runController($route); 142 } 143 144 /** 145 * Registers the core application components. 146 * This method overrides the parent implementation by registering additional core components. |
#17 |
+
–
/data/webdev/master/framework/base/CApplication.php(185): CWebApplication->processRequest() 180 public function run() 181 { 182 if($this->hasEventHandler('onBeginRequest')) 183 $this->onBeginRequest(new CEvent($this)); 184 register_shutdown_function(array($this,'end'),0,false); 185 $this->processRequest(); 186 if($this->hasEventHandler('onEndRequest')) 187 $this->onEndRequest(new CEvent($this)); 188 } 189 190 /** |
#18 |
+
–
/data/webdev/master/index.php(192): CApplication->run() 187 require_once APPPATH . 'core/LSYii_Application' . EXT; 188 189 $config = require_once(APPPATH . 'config/internal' . EXT); 190 191 Yii::$enableIncludePath = false; 192 Yii::createApplication('LSYii_Application', $config)->run(); 193 194 /* End of file index.php */ 195 /* Location: ./index.php */ |