public function AbjsExperienceDeleteConfirmForm::submitForm in A/B Test JS 8
Same name and namespace in other branches
- 2.0.x src/Form/AbjsExperienceDeleteConfirmForm.php \Drupal\abjs\Form\AbjsExperienceDeleteConfirmForm::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/ AbjsExperienceDeleteConfirmForm.php, line 112
Class
- AbjsExperienceDeleteConfirmForm
- Class for confirm delete experience.
Namespace
Drupal\abjs\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$this->database
->delete('abjs_experience')
->condition('eid', $this->id)
->execute();
$this->database
->delete('abjs_test_experience')
->condition('eid', $this->id)
->execute();
$this
->messenger()
->addMessage($this
->t('Experience %id has been deleted.', [
'%id' => $this->id,
]));
$form_state
->setRedirect('abjs.experience_admin');
}