You are here

protected function MaillogController::getMaillogEntry in Maillog / Mail Developer 8

Loads the Maillog entry.

Parameters

int $id: The maillog ID.

Return value

array A Maillog record.

1 call to MaillogController::getMaillogEntry()
MaillogController::details in src/Controller/MaillogController.php
Get the Maillog entry.

File

src/Controller/MaillogController.php, line 119

Class

MaillogController
Primary controler behind the Maillog module.

Namespace

Drupal\maillog\Controller

Code

protected function getMaillogEntry($id) {
  $result = $this->database
    ->query("SELECT id, header_from, header_to, header_reply_to, header_all, subject, body FROM {maillog} WHERE id=:id", [
    ':id' => $id,
  ]);
  if ($maillog = $result
    ->fetchAssoc()) {

    // Unserialize values.
    $maillog['header_all'] = unserialize($maillog['header_all']);
  }
  return $maillog;
}