Skip to content

Commit 15b61cf

Browse files
committed
Expose default_variables to email templates
1 parent e32fb0f commit 15b61cf

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

bundle/Factory/AutoResponderDataFactory.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ protected function resolveRecipient(TemplateData $data)
5858
'event' => $data->getEvent(),
5959
'collected_fields' => $fields,
6060
'content' => $data->getContent(),
61+
'default_variables' => !empty($this->config[ConfigurationConstants::DEFAULT_VARIABLES])
62+
? $this->config[ConfigurationConstants::DEFAULT_VARIABLES] : null,
6163
)
6264
);
6365

@@ -93,6 +95,8 @@ protected function resolveSubject(TemplateData $data)
9395
'event' => $data->getEvent(),
9496
'collected_fields' => $fields,
9597
'content' => $data->getContent(),
98+
'default_variables' => !empty($this->config[ConfigurationConstants::DEFAULT_VARIABLES])
99+
? $this->config[ConfigurationConstants::DEFAULT_VARIABLES] : null,
96100
)
97101
);
98102

bundle/Factory/EmailDataFactory.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,8 @@ protected function resolve(TemplateData $data, $field, $property = Constants::FI
115115
'event' => $data->getEvent(),
116116
'collected_fields' => $data->getEvent()->getInformationCollectionStruct()->getCollectedFields(),
117117
'content' => $data->getContent(),
118+
'default_variables' => !empty($this->config[ConfigurationConstants::DEFAULT_VARIABLES])
119+
? $this->config[ConfigurationConstants::DEFAULT_VARIABLES] : null,
118120
)
119121
);
120122

@@ -159,6 +161,8 @@ protected function resolveEmail(TemplateData $data, $field)
159161
'event' => $data->getEvent(),
160162
'collected_fields' => $data->getEvent()->getInformationCollectionStruct()->getCollectedFields(),
161163
'content' => $data->getContent(),
164+
'default_variables' => !empty($this->config[ConfigurationConstants::DEFAULT_VARIABLES])
165+
? $this->config[ConfigurationConstants::DEFAULT_VARIABLES] : null,
162166
)
163167
);
164168

0 commit comments

Comments
 (0)