public function WebformHandlerDeleteForm::submitForm in Webform 8.5
Same name and namespace in other branches
- 6.x src/Form/WebformHandlerDeleteForm.php \Drupal\webform\Form\WebformHandlerDeleteForm::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 FormInterface::submitForm
File
- src/
Form/ WebformHandlerDeleteForm.php, line 108
Class
- WebformHandlerDeleteForm
- Form for deleting a webform handler.
Namespace
Drupal\webform\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$this->webform
->deleteWebformHandler($this->webformHandler);
$this
->messenger()
->addStatus($this
->t('The webform handler %name has been deleted.', [
'%name' => $this->webformHandler
->label(),
]));
$form_state
->setRedirectUrl($this->webform
->toUrl('handlers'));
}