mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 13:12:50 +01:00
raw subject and raw body
This commit is contained in:
parent
9c0ce6b085
commit
7907eae103
@ -44,6 +44,10 @@ class TemplateEngine
|
||||
|
||||
private $settings;
|
||||
|
||||
private $raw_body;
|
||||
|
||||
private $raw_subject;
|
||||
|
||||
public function __construct($body, $subject, $entity, $entity_id, $template)
|
||||
{
|
||||
$this->body = $body;
|
||||
@ -121,6 +125,9 @@ class TemplateEngine
|
||||
|
||||
private function replaceValues()
|
||||
{
|
||||
$this->raw_body = $this->body;
|
||||
$this->raw_subject = $this->subject;
|
||||
|
||||
if ($this->entity_obj) {
|
||||
$this->entityValues($this->entity_obj->client->primary_contact()->first());
|
||||
} else {
|
||||
@ -157,6 +164,7 @@ class TemplateEngine
|
||||
$this->body = strtr($this->body, $data['values']);
|
||||
$this->body = str_replace("\n", "<br>", $this->body);
|
||||
|
||||
|
||||
$this->subject = strtr($this->subject, $data['labels']);
|
||||
$this->subject = strtr($this->subject, $data['values']);
|
||||
|
||||
@ -197,9 +205,10 @@ class TemplateEngine
|
||||
'subject' => $this->subject,
|
||||
'body' => $this->body,
|
||||
'wrapper' => $wrapper,
|
||||
'raw_body' => $this->raw_body,
|
||||
'raw_subject' => $this->raw_subject
|
||||
];
|
||||
|
||||
|
||||
|
||||
$this->tearDown();
|
||||
|
||||
return $data;
|
||||
|
Loading…
Reference in New Issue
Block a user