protected function EmailHandler::buildHtmlBody in Easy Email 2.0.x
Same name and namespace in other branches
- 8 src/Service/EmailHandler.php \Drupal\easy_email\Service\EmailHandler::buildHtmlBody()
Parameters
\Drupal\easy_email\Entity\EasyEmailInterface $email:
Return value
array
2 calls to EmailHandler::buildHtmlBody()
- EmailHandler::createUnsafeEmailsForRecipients in src/
Service/ EmailHandler.php - EmailHandler::generateEmailParams in src/
Service/ EmailHandler.php
File
- src/
Service/ EmailHandler.php, line 403
Class
Namespace
Drupal\easy_email\ServiceCode
protected function buildHtmlBody(EasyEmailInterface $email) {
$body = [
'body' => [
'#theme' => 'easy_email_body_html',
'#easy_email' => $email,
],
];
if ($this
->hasInboxPreview($email)) {
$body['inbox_preview'] = [
'#theme' => 'easy_email_body_inbox_preview',
'#easy_email' => $email,
'#weight' => -100,
];
}
return $body;
}