Jet\Mailing_Email_Template
Class for working with email templates - see introductory chapter.
Overview of methods
Method | Meaning of |
---|---|
public __construct( string $template_id, string $sender_id=Mailing::DEFAULT_SENDER_ID, Locale $locale=null ) : |
Parameters:
|
public setViewDir( string $view_dir ) : void |
Sets an optional path to the view scripts directory of the email template. |
public getViewDir( ) : string |
Returns the path to the view scripts directory, either the set optional path or the path given by the system configuration, locale and template ID. Thus specified as follows:
SysConf_Jet_Mailing::getTemplatesDir()
|
public getView( ) : MVC_View |
Returns an instance of view of the template. |
public getTemplateId( ) : string |
Returns the template ID. |
public getLocale( ) : Locale |
Returns the location of the template. |
public getSenderId( ) : string |
Returns the sender ID. |
public getSender( ) : Mailing_Config_Sender |
Returns the sender definition. |
public setVar( string $key, mixed $value ) : void |
Sets the optional template data. In effect, this optional data is passed to view and can be used in view scripts. |
public getSubject( ) : string |
Generates and returns the subject of the email. |
public getBodyHtml( bool $parse_images=true ) : string |
Generates and returns the HTML body of the email. |
public getBodyTxt( ) : string |
Generates and returns the text body of the email. |
public getEmail( ) : Mailing_Email |
It will generate and return the entire email. It can be further edited (especially to add attachments) and sent. |