You are here

public function RiddlerSettingsForm::submitForm in Captcha Riddler 8

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/RiddlerSettingsForm.php, line 209

Class

RiddlerSettingsForm
Displays the Riddler settings form.

Namespace

Drupal\riddler\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $riddles = $form_state
    ->getValues()['riddler'];
  $this
    ->recursiveUnset($riddles, 'delete');
  $this
    ->config('riddler.settings')
    ->set('riddles', $riddles)
    ->save();
  parent::SubmitForm($form, $form_state);
}