public function ServerDeleteConfirmForm::submitForm in Search API 8
Overrides EntityDeleteFormTrait::submitForm
File
- src/
Form/ ServerDeleteConfirmForm.php, line 73
Class
- ServerDeleteConfirmForm
- Defines a confirm form for deleting a server.
Namespace
Drupal\search_api\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$this->entity
->delete();
$this->messenger
->addStatus($this
->t('The search server %name has been deleted.', [
'%name' => $this->entity
->label(),
]));
$form_state
->setRedirect('search_api.overview');
}