Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Longtext Class Reference

Inheritance diagram for Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Longtext:

Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract Mage_Adminhtml_Block_Abstract Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Interface Mage_Core_Block_Template Mage_Core_Block_Abstract Varien_Object

List of all members.

Public Member Functions

 render (Varien_Object $row)


Detailed Description

Definition at line 34 of file Longtext.php.


Member Function Documentation

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()

Parameters:
Varien_Object $row
Returns:
unknown

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     }


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

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