You are here

function matching_config in Quiz 8.4

Same name and namespace in other branches
  1. 6.4 question_types/matching/matching.module \matching_config()
  2. 7 question_types/matching/matching.module \matching_config()
  3. 7.4 question_types/matching/matching.module \matching_config()

hook_config

Return value

FAPI array

File

question_types/matching/matching.module, line 46
Matching question type for quiz module

Code

function matching_config() {
  $config = \Drupal::config('matching.settings');
  $form['quiz_matching_form_size'] = array(
    '#type' => 'textfield',
    '#title' => t('Match Question Size'),
    '#description' => t('Number of questions allowed to wrap under a matching type question.'),
    '#default_value' => $config
      ->get('quiz_matching_form_size'),
  );
  $form['quiz_matching_shuffle_options'] = array(
    '#type' => 'checkbox',
    '#title' => t('Shuffle Matching Questions'),
    '#default_value' => $config
      ->get('quiz_matching_shuffle_options'),
    '#description' => t('If checked matching questions will be shuffled'),
  );
  $form['#validate'][] = 'matching_config_validate';
  $form['#submit'][] = 'matching_config_submit';
  return $form;
}