public function DeleteForm::submitForm in Mail Safety 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 FormInterface::submitForm
File
- src/
Form/ DeleteForm.php, line 64
Class
- DeleteForm
- Class DeleteForm.
Namespace
Drupal\mail_safety\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
MailSafetyController::delete($this->mailSafety['mail_id']);
$form_state
->setRedirectUrl($this
->getCancelUrl());
}