You are here

private function ScaleQuestion::makeOptions in Quiz 7.4

Same name and namespace in other branches
  1. 8.6 question_types/quiz_scale/src/Plugin/quiz/QuizQuestion/ScaleQuestion.php \ScaleQuestion::makeOptions()
  2. 8.5 question_types/quiz_scale/src/Plugin/quiz/QuizQuestion/ScaleQuestion.php \ScaleQuestion::makeOptions()
  3. 6.6 question_types/scale/scale.classes.inc \ScaleQuestion::makeOptions()
  4. 6.4 question_types/scale/scale.classes.inc \ScaleQuestion::makeOptions()
  5. 7.6 question_types/scale/scale.classes.inc \ScaleQuestion::makeOptions()
  6. 7 question_types/scale/scale.classes.inc \ScaleQuestion::makeOptions()
  7. 7.5 question_types/scale/scale.classes.inc \ScaleQuestion::makeOptions()

Makes options array for form elements.

Parameters

$collections: collections array, from getPresetCollections() for instance...

Return value

#options array.

1 call to ScaleQuestion::makeOptions()
ScaleQuestion::getCreationForm in question_types/scale/scale.classes.inc
Implementation of getCreationForm

File

question_types/scale/scale.classes.inc, line 500
The main classes for the scale question type.

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;
}