You are here

public function W3cValidatorSettingsForm::submitForm in W3C Validator 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/W3cValidatorSettingsForm.php, line 98

Class

W3cValidatorSettingsForm
Configuration settings page for W3C Validator page.

Namespace

Drupal\w3c_validator\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  parent::submitForm($form, $form_state);
  $this
    ->config('w3c_validator.settings')
    ->set('validator_url', $form_state
    ->getValue('validator_url'))
    ->save();
}