Protected Member Functions | |
_toHtml () |
Definition at line 34 of file Preview.php.
_toHtml | ( | ) | [protected] |
Render block HTML
Reimplemented from Mage_Core_Block_Template.
Definition at line 37 of file Preview.php.
00038 { 00039 $template = Mage::getModel('core/email_template'); 00040 if($id = (int)$this->getRequest()->getParam('id')) { 00041 $template->load($id); 00042 } else { 00043 $template->setTemplateType($this->getRequest()->getParam('type')); 00044 $template->setTemplateText($this->getRequest()->getParam('text')); 00045 } 00046 00047 Varien_Profiler::start("email_template_proccessing"); 00048 $vars = array(); 00049 00050 $templateProcessed = $template->getProcessedTemplate($vars, true); 00051 00052 if($template->isPlain()) { 00053 $templateProcessed = "<pre>" . htmlspecialchars($templateProcessed) . "</pre>"; 00054 } 00055 00056 Varien_Profiler::stop("email_template_proccessing"); 00057 00058 return $templateProcessed; 00059 }