public static function MailSafetyController::delete in Mail Safety 8
Delete a mail from the database.
Parameters
int $mail_id: The mail id.
2 calls to MailSafetyController::delete()
- ClearForm::submitForm in src/
Form/ ClearForm.php - Form submission handler.
- DeleteForm::submitForm in src/
Form/ DeleteForm.php - Form submission handler.
File
- src/
Controller/ MailSafetyController.php, line 103
Class
- MailSafetyController
- Class MailSafetyController.
Namespace
Drupal\mail_safety\ControllerCode
public static function delete($mail_id) {
$connection = \Drupal::database();
$connection
->delete('mail_safety_dashboard')
->condition('mail_id', $mail_id)
->execute();
}