function template_preprocess_easy_email_body_html in Easy Email 2.0.x
Same name and namespace in other branches
- 8 easy_email.module \template_preprocess_easy_email_body_html()
File
- ./
easy_email.module, line 148 - Contains easy_email.module.
Code
function template_preprocess_easy_email_body_html(array &$variables) {
/** @var \Drupal\easy_email\Entity\EasyEmailInterface $email */
$email = $variables['easy_email'];
$html_body = $email
->getHtmlBody();
if (!empty($html_body)) {
$variables['body'] = [
'#type' => 'processed_text',
'#text' => $html_body['value'],
'#format' => $html_body['format'],
];
}
}