Mage_Adminhtml_Block_System_Email_Template_Preview Class Reference

Inheritance diagram for Mage_Adminhtml_Block_System_Email_Template_Preview:

Mage_Adminhtml_Block_Widget Mage_Adminhtml_Block_Template Mage_Core_Block_Template Mage_Core_Block_Abstract Varien_Object

List of all members.

Protected Member Functions

 _toHtml ()


Detailed Description

Definition at line 34 of file Preview.php.


Member Function Documentation

_toHtml (  )  [protected]

Render block HTML

Returns:
string

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     }


The documentation for this class was generated from the following file:

Generated on Sat Jul 4 17:23:04 2009 for Magento by  doxygen 1.5.8