Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
symfony_mailer
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
symfony_mailer
Commits
33092e70
Commit
33092e70
authored
1 year ago
by
Julian Pustkuchen
Committed by
Adam Shepherd
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
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
!50
Issue #3366238: Pass mail subject to the twig files
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
symfony_mailer.module
+2
-0
2 additions, 0 deletions
symfony_mailer.module
templates/email-wrap.html.twig
+1
-0
1 addition, 0 deletions
templates/email-wrap.html.twig
with
3 additions
and
0 deletions
symfony_mailer.module
+
2
−
0
View file @
33092e70
...
...
@@ -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
();
...
...
This diff is collapsed.
Click to expand it.
templates/email-wrap.html.twig
+
1
−
0
View file @
33092e70
...
...
@@ -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.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment