/** * จัดรูปแบบการแสดงผลในแต่ละแถว * * @param array $item * @return array */ public function onRow($item) { foreach ($item as $key => $value) { if ($key != 'id') { $text = \Kotchasan\Text::toEditor(is_array($value) ? implode(', ', $value) : $value); $item[$key] = '<span title="' . $text . '">' . \Kotchasan\Text::cut($text, 50) . '</span>'; } } return $item; }
/** * Generated from @assert ('&"'."'<>{}&&") [==] "&"'<>{}&&". * * @covers Kotchasan\Text::toEditor */ public function testToEditor() { $this->assertEquals("&"'<>{}&&", \Kotchasan\Text::toEditor('&"' . "'<>{}&&")); }