public function SimpleDialogSettingsForm::submitForm in Simple Dialog 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
- lib/
Drupal/ simple_dialog/ Form/ SimpleDialogSettingsForm.php, line 72 - Contains \Drupal\system\Form\SiteMaintenanceModeForm. File should live in <module_root>/lib/Drupal/module_name/Form/ModuleSystemSettingsForm.php (PSR-0)
Class
- SimpleDialogSettingsForm
- Defines a form to configure maintenance settings for this site.
Namespace
Drupal\simple_dialog\FormCode
public function submitForm(array &$form, array &$form_state) {
$this->configFactory
->get('simple_dialog.settings')
->set('js_all', $form_state['values']['js_all'])
->set('classes', $form_state['values']['classes'])
->set('defaults.settings', $form_state['values']['default_settings'])
->set('defaults.target_selector', $form_state['values']['default_target_selector'])
->set('defaults.title', $form_state['values']['default_title'])
->save();
parent::submitForm($form, $form_state);
}