private function ScaleQuestion::makeOptions in Quiz 8.5
Same name and namespace in other branches
- 8.6 question_types/quiz_scale/src/Plugin/quiz/QuizQuestion/ScaleQuestion.php \ScaleQuestion::makeOptions()
- 6.6 question_types/scale/scale.classes.inc \ScaleQuestion::makeOptions()
- 6.4 question_types/scale/scale.classes.inc \ScaleQuestion::makeOptions()
- 7.6 question_types/scale/scale.classes.inc \ScaleQuestion::makeOptions()
- 7 question_types/scale/scale.classes.inc \ScaleQuestion::makeOptions()
- 7.4 question_types/scale/scale.classes.inc \ScaleQuestion::makeOptions()
- 7.5 question_types/scale/scale.classes.inc \ScaleQuestion::makeOptions()
Makes options array for form elements.
Parameters
array $collections: Collections array, from getPresetCollections() for instance...
Return value
array An array with options.
1 call to ScaleQuestion::makeOptions()
- ScaleQuestion::getCreationForm in question_types/
quiz_scale/ src/ Plugin/ quiz/ QuizQuestion/ ScaleQuestion.php - Implementation of getCreationForm().
File
- question_types/
quiz_scale/ src/ Plugin/ quiz/ QuizQuestion/ ScaleQuestion.php, line 520 - Scale classes.
Class
- ScaleQuestion
- Extension of QuizQuestion.
Code
private function makeOptions(array $collections = NULL) {
$options = array();
foreach ($collections as $col_id => $obj) {
$options[$col_id] = $obj->name;
}
return $options;
}