TMail_Part::init PHP Method

init() public method

public init ( )
    public function init()
    {
        parent::init();
        // Initialize template of this part
        $t = $this->defaultTemplate();
        $this->template = $this->add($this->owner->template_class);
        /** @type TMail_Template $this->template */
        $this->template->loadTemplate($t[0], '.mail');
        if ($t[1]) {
            $this->template = $this->template->cloneRegion($t[1]);
        }
    }

Usage Example

Esempio n. 1
0
 function init()
 {
     parent::init();
     $this->template->set('contenttype', 'text/plain');
 }