mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
parents-merge 33138 - Added IsEmail boolean to email templates
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@45039 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
5d6a4df183
commit
f246e4fbe2
@ -126,13 +126,21 @@ class Email extends ViewableData {
|
||||
"From" => $this->from,
|
||||
"Subject" => $this->subject,
|
||||
"Body" => $this->body,
|
||||
"BaseURL" => $this->BaseURL()
|
||||
"BaseURL" => $this->BaseURL(),
|
||||
"IsEmail" => true,
|
||||
));
|
||||
} else {
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Used by SSViewer templates to detect if we're rendering an email template rather than a page template
|
||||
*/
|
||||
public function IsEmail() {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Load all the template variables into the internal variables, including
|
||||
* the template into body. Called before send() or debugSend()
|
||||
|
Loading…
x
Reference in New Issue
Block a user