public function SiteSettingsConfigForm::submitForm in Site Settings and Labels 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/ SiteSettingsConfigForm.php, line 101
Class
- SiteSettingsConfigForm
- Class SiteSettingsConfigForm.
Namespace
Drupal\site_settings\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
parent::submitForm($form, $form_state);
$this
->config('site_settings.config')
->set('template_key', $form_state
->getValue('template_key'))
->save();
}