public function WebformAdminConfigVariantsForm::submitForm in Webform 8.5
Same name and namespace in other branches
- 6.x src/Form/AdminConfig/WebformAdminConfigVariantsForm.php \Drupal\webform\Form\AdminConfig\WebformAdminConfigVariantsForm::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/ WebformAdminConfigVariantsForm.php, line 115
Class
- WebformAdminConfigVariantsForm
- Configure webform admin settings for variants.
Namespace
Drupal\webform\Form\AdminConfigCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$excluded_variants = $this
->convertIncludedToExcludedPluginIds($this->variantManager, $form_state
->getValue('excluded_variants'));
// Update config and submit form.
$config = $this
->config('webform.settings');
$config
->set('variant', [
'excluded_variants' => $excluded_variants,
]);
parent::submitForm($form, $form_state);
}