public function WebformAdminConfigSubmissionsForm::submitForm in Webform 6.x
Same name and namespace in other branches
- 8.5 src/Form/AdminConfig/WebformAdminConfigSubmissionsForm.php \Drupal\webform\Form\AdminConfig\WebformAdminConfigSubmissionsForm::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 WebformAdminConfigBaseForm::submitForm
File
- src/
Form/ AdminConfig/ WebformAdminConfigSubmissionsForm.php, line 257
Class
- WebformAdminConfigSubmissionsForm
- Configure webform admin settings for submissions.
Namespace
Drupal\webform\Form\AdminConfigCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$settings = $form_state
->getValue('submission_settings') + $form_state
->getValue('submission_behaviors') + $form_state
->getValue('submission_limits') + $form_state
->getValue('draft_settings') + $form_state
->getValue('bulk_form_settings') + $form_state
->getValue('views_settings');
// Update config and submit form.
$config = $this
->config('webform.settings');
$config
->set('settings', $settings + $config
->get('settings'));
$config
->set('purge', $form_state
->getValue('purge'));
parent::submitForm($form, $form_state);
}