string = $string; parent::__construct($context, $data); } /** * Renders grid column * * @param \Magento\Framework\DataObject $row * @return string */ public function render(\Magento\Framework\DataObject $row) { $line = parent::_getValue($row); $wrappedLine = ''; $lineLength = $this->getColumn()->getData( 'lineLength' ) ? $this->getColumn()->getData( 'lineLength' ) : $this->_defaultMaxLineLength; for ($i = 0, $n = floor($this->string->strlen($line) / $lineLength); $i <= $n; $i++) { $wrappedLine .= $this->string->substr($line, $lineLength * $i, $lineLength) . "
"; } return $wrappedLine; } }