Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Wrapline Class Reference

Inheritance diagram for Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Wrapline:

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)

Protected Attributes

 $_defaultMaxLineLength = 60


Detailed Description

Definition at line 34 of file Wrapline.php.


Member Function Documentation

render ( Varien_Object row  ) 

Renders grid column

Parameters:
Varien_Object $row
Returns:
string

Reimplemented from Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract.

Definition at line 49 of file Wrapline.php.

00050     {
00051         $line = parent::_getValue($row);
00052         $wrappedLine = '';
00053         $lineLength = ($this->getColumn()->getData('lineLength')?$this->getColumn()->getData('lineLength'):$this->_defaultMaxLineLength);
00054         for($i=0, $n=floor(Mage::helper('core/string')->strlen($line)/$lineLength); $i<=$n; $i++) {
00055             $wrappedLine .= Mage::helper('core/string')->substr($line, ($lineLength*$i), $lineLength)."<br />";
00056         }
00057         return $wrappedLine;
00058     }


Member Data Documentation

$_defaultMaxLineLength = 60 [protected]

Definition at line 41 of file Wrapline.php.


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