You are here

public function PageSpecificClassSettingsForm::submitForm in Page Specific Class 8

Same name and namespace in other branches
  1. 2.0.x src/Form/PageSpecificClassSettingsForm.php \Drupal\page_specific_class\Form\PageSpecificClassSettingsForm::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/PageSpecificClassSettingsForm.php, line 72

Class

PageSpecificClassSettingsForm
Configure custom settings for Page Specific Class.

Namespace

Drupal\page_specific_class\Form

Code

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