public function SearchIndexWipeConfirm::submitForm in Search Index Wipe 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/ SearchIndexWipeConfirm.php, line 48
Class
- SearchIndexWipeConfirm
- Class SearchIndexWipeConfirm.
Namespace
Drupal\searchindex_wipe\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
if ($form['confirm']) {
searchindex_wipe_truncate_table();
$form_state
->setRedirectUrl($this
->getCancelUrl());
}
}