You are here

public function QuizFeedbackConditionsForm::submitForm in Quiz 8.6

Same name and namespace in other branches
  1. 8.5 src/Form/QuizFeedbackConditionsForm.php \Drupal\quiz\Form\QuizFeedbackConditionsForm::submitForm()
  2. 6.x src/Form/QuizFeedbackConditionsForm.php \Drupal\quiz\Form\QuizFeedbackConditionsForm::submitForm()

Form submission handler.

Parameters

array $form: An associative array containing the structure of the form.

\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.

Overrides ConfigFormBase::submitForm

File

src/Form/QuizFeedbackConditionsForm.php, line 67

Class

QuizFeedbackConditionsForm
Rules condition form for feedback types.

Namespace

Drupal\quiz\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $this->rulesUiHandler
    ->getForm()
    ->submitForm($form['conditions'], $form_state);

  // Save the configuration that submitForm() updated (the config entity).
  $config = $this->rulesUiHandler
    ->getConfig();
  $config
    ->save();

  // Also remove the temporarily stored component, it has been persisted now.
  $this->rulesUiHandler
    ->clearTemporaryStorage();
  parent::submitForm($form, $form_state);
}