public function PageSpecificClassSettingsForm::submitForm in Page Specific Class 2.0.x
Same name and namespace in other branches
- 8 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 74
Class
- PageSpecificClassSettingsForm
- Configure custom settings for Page Specific Class.
Namespace
Drupal\page_specific_class\FormCode
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);
}