public function MaillogController::delete in Maillog / Mail Developer 8
Delete a specific maillog entry.
Parameters
int $maillog_id: The maillog ID.
1 string reference to 'MaillogController::delete'
File
- src/
Controller/ MaillogController.php, line 102
Class
- MaillogController
- Primary controler behind the Maillog module.
Namespace
Drupal\maillog\ControllerCode
public function delete($maillog_id) {
$id = intval($maillog_id);
$this->database
->query("DELETE FROM {maillog} WHERE id = :id", [
':id' => $id,
]);
$this
->messenger()
->addStatus($this
->t('Mail with ID @id has been deleted!', [
'@id' => $id,
]));
return $this
->redirect('view.maillog_overview.page_1');
}