function template_preprocess_swiftmailer in Swift Mailer 8.2
Same name and namespace in other branches
- 8 swiftmailer.module \template_preprocess_swiftmailer()
Prepares variables for swiftmailer templates.
Default template: swiftmailer.html.twig.
Parameters
array $variables: An associative array containing:
- message: An associative array containing the message array.
- is_html: True if generating HTML output, false for plain text.
File
- ./
swiftmailer.module, line 85 - This is the primary module file.
Code
function template_preprocess_swiftmailer(&$variables) {
$variables['base_url'] = $GLOBALS['base_url'];
$variables['subject'] = $variables['message']['subject'];
$variables['body'] = $variables['message']['body'];
}