public function LoginSecurityAdminSettings::cleanTrackedEvents in Login Security 2.x
Same name and namespace in other branches
- 8 src/Form/LoginSecurityAdminSettings.php \Drupal\login_security\Form\LoginSecurityAdminSettings::cleanTrackedEvents()
Submit handler to clean the login_security_track table.
Parameters
array $form: An associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface $form_state: An associative array containing the current state of the form.
File
- src/
Form/ LoginSecurityAdminSettings.php, line 239
Class
- LoginSecurityAdminSettings
- Class LoginSecurityAdminSettings.
Namespace
Drupal\login_security\FormCode
public function cleanTrackedEvents(array &$form, FormStateInterface $form_state) {
$count = _login_security_remove_all_events();
$this
->messenger()
->addMessage($this
->t('Login Security event track list is now empty. @count item(s) deleted.', [
'@count' => $count,
]));
}