You are here

public function WebformAdminConfigHandlersForm::submitForm in Webform 6.x

Same name and namespace in other branches
  1. 8.5 src/Form/AdminConfig/WebformAdminConfigHandlersForm.php \Drupal\webform\Form\AdminConfig\WebformAdminConfigHandlersForm::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/WebformAdminConfigHandlersForm.php, line 177

Class

WebformAdminConfigHandlersForm
Configure webform admin settings for handlers.

Namespace

Drupal\webform\Form\AdminConfig

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $excluded_handlers = $this
    ->convertIncludedToExcludedPluginIds($this->handlerManager, $form_state
    ->getValue('excluded_handlers'));

  // Update config and submit form.
  $config = $this
    ->config('webform.settings');
  $config
    ->set('handler', [
    'excluded_handlers' => $excluded_handlers,
  ]);
  $config
    ->set('mail', $form_state
    ->getValue('mail'));
  parent::submitForm($form, $form_state);
}