public function DevelopmentEnvironmentClearLogForm::submitForm in Development Environment 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/ DevelopmentEnvironmentClearLogForm.php, line 72
Class
- DevelopmentEnvironmentClearLogForm
- Form to clear the email log.
Namespace
Drupal\development_environment\FormCode
public function submitForm(array &$form, FormStateInterface $formState) {
$this->database
->query('TRUNCATE {development_environment_log}');
$this
->messenger()
->addStatus($this
->t('The suppressed email log has been cleared'));
}