Public Member Functions | |
render (Varien_Object $row) |
Definition at line 34 of file Longtext.php.
render | ( | Varien_Object $ | row | ) |
Render contents as a long text
Text will be truncated as specified in string_limit, truncate or 250 by default Also it can be html-escaped and nl2br()
Varien_Object | $row |
Reimplemented from Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract.
Definition at line 45 of file Longtext.php.
00046 { 00047 $truncateLength = 250; 00048 // stringLength() is for legacy purposes 00049 if ($this->getColumn()->getStringLimit()) { 00050 $truncateLength = $this->getColumn()->getStringLimit(); 00051 } 00052 if ($this->getColumn()->getTruncate()) { 00053 $truncateLength = $this->getColumn()->getTruncate(); 00054 } 00055 $text = Mage::helper('core/string')->truncate(parent::_getValue($row), $truncateLength); 00056 if ($this->getColumn()->getEscape()) { 00057 $text = $this->htmlEscape($text); 00058 } 00059 if ($this->getColumn()->getNl2br()) { 00060 $text = nl2br($text); 00061 } 00062 return $text; 00063 }