\EmailTemplate
Synopsis
class EmailTemplate
extends Email
{
- // members
- protected bool $is_internal_message = false;
- protected array $rendering_variables = ;
- private Member $queue_recipient_member = NULL;
- // methods
- public final void __construct()
- protected abstract void init()
- protected DateTime|null getSendingSchedule()
- public bool|EmailQueue send()
- public static string TestSiteOverridingAddress()
- private void test_site_is_email_whitelisted()
- public Email setTo()
- public void addTo()
- public void removeTo()
- public void forTemplate()
- public void renderBody()
- private string resolve_email_address()
- private void implode_email_addresses()
- public array getRenderingVariables()
- public void setRenderingVariables()
- public void setRenderingVariable()
- public Member getQueueRecipientMember()
- public void setQueueRecipientMember()
- private void isDevOrTest()
Hierarchy
Extends
Members
private
- $queue_recipient_member — Member
protected
- $is_internal_message
—
bool
If true, the message will be sent to the admin email. No need to define a 'to' address. - $rendering_variables
Methods
private
- implode_email_addresses()
- isDevOrTest()
- resolve_email_address() — Ensures that the given value is a string containing either one email address or multiple comma separated email addresses. Accepts either a simple string, an array of strings or an object implementing the EmailAddressProvider interface as a parameter.
- test_site_is_email_whitelisted()
protected
- getSendingSchedule() — Subclasses of EmailTemplate can use this to delay email sending by returning a Datetime instance. Returning null sends immediately or if sending is queued, sends in just a few minutes.
- init() — Meant for subclasses of EmailTemplate to be able to define some settings. __construct() is too complicated by it's signature and therefore it cannot be overloaded in sub classes. This method is called as part of the __construct() call.
public
- __construct()
- TestSiteOverridingAddress() — Returns the address that should be used in test site when overriding some none whitelisted email addresses.
- addTo()
- forTemplate()
- getQueueRecipientMember()
- getRenderingVariables()
- removeTo()
- renderBody() — Looks for a ClassName.ss template and renders its content to the body of this email message.
- send()
- setQueueRecipientMember()
- setRenderingVariable()
- setRenderingVariables()
- setTo()