Skip to content
Snippets Groups Projects
Commit 33092e70 authored by Julian Pustkuchen's avatar Julian Pustkuchen Committed by Adam Shepherd
Browse files

Issue #3366238 by Anybody, Grevil: Pass mail subject to the twig files as variable

parent d101e165
No related branches found
No related tags found
1 merge request!50Issue #3366238: Pass mail subject to the twig files
......@@ -123,6 +123,7 @@ function symfony_mailer_preprocess_commerce_order(&$variables) {
function template_preprocess_email(array &$variables) {
$email = $variables['email'];
$variables['body'] = $email->getBody();
$variables['subject'] = $email->getSubject();
$variables = array_merge($variables, $email->getVariables());
}
......@@ -139,6 +140,7 @@ function template_preprocess_email(array &$variables) {
*/
function template_preprocess_email_wrap(array &$variables) {
$email = $variables['email'];
$variables['subject'] = $email->getSubject();
$variables['type'] = $email->getType();
$variables['sub_type'] = $email->getSubType();
$variables['attributes'] = new Attribute();
......
......@@ -6,6 +6,7 @@
* Variables:
* - body: Email body content.
* - is_html: True if generating HTML output, false for plain text.
* - subject: Email subject.
* - type: Email type.
* - sub_type: Email sub-type.
* - attributes: HTML attributes for the top-level email element.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment