private function renderBody() { $rowset = $this->dataGrid->getAdapter()->toArray(); $columnNames = $this->getColumnNames(); $rows = array(); while ($row = array_shift($rowset)) { // create table with aliases // this allow array_merge with named spacial columns // to merge completely... ie. special column can swap with row cell. $row = array_combine($columnNames, $row); $specialCells = $this->renderSpecialCell($row); $row = array_merge($row, $specialCells); $cells = sprintf('<td>%s</td>', implode('</td><td>', $row)); $rows[] = sprintf('<tr>%s</tr>', $cells); } return implode("\n", $rows); }
/** * @covers DataGrid\DataGrid::getAdapter * @expectedException \DataGrid\Exception\InvalidArgumentException */ public function testGetAdapter() { $this->object->getAdapter(); }