EmailTemplate::__construct PHP Méthode

__construct() public méthode

public __construct ( string $message = '', string $title = '', string $lead = '', string $view = 'email-basic' )
$message string HTML formatted email message (the body of the email).
$title string HTML formatted email title.
$lead string HTML formatted email lead (sub-title, appears under title).
$view string
    function __construct($message = '', $title = '', $lead = '', $view = 'email-basic')
    {
        parent::__construct();
        $this->setMessage($message);
        $this->setTitle($title);
        $this->setLead($lead);
        // Set templating defaults
        $this->setTextColor(c('Garden.EmailTemplate.TextColor', self::DEFAULT_TEXT_COLOR));
        $this->setBackgroundColor(c('Garden.EmailTemplate.BackgroundColor', self::DEFAULT_BACKGROUND_COLOR));
        $this->setContainerBackgroundColor(c('Garden.EmailTemplate.ContainerBackgroundColor', self::DEFAULT_CONTAINER_BACKGROUND_COLOR));
        $this->setDefaultButtonBackgroundColor(c('Garden.EmailTemplate.ButtonBackgroundColor', self::DEFAULT_BUTTON_BACKGROUND_COLOR));
        $this->setDefaultButtonTextColor(c('Garden.EmailTemplate.ButtonTextColor', self::DEFAULT_BUTTON_TEXT_COLOR));
        $this->setDefaultEmailImage();
        // Set default view
        $this->view = AssetModel::viewLocation($view, 'email', 'dashboard');
    }

Usage Example

Exemple #1
0
 function __construct($conx = NULL, $table_name = "")
 {
     parent::__construct($conx, $table_name);
 }