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