public function testShouldBeAbleToProduceArrayOfCells() { $cellData = $this->data[0]; $cellsArray = $this->parser->rowDataToCells($cellData); $this->assertEquals(count($cellData), count($cellsArray)); $this->assertInstanceOf("Datagrid\\BasicElements\\Cell", $cellsArray[0]); }
public function __construct(array $rowData, array $hidedColumns) { $parser = new Parser(); $this->cells = $parser->rowDataToCells($rowData); $this->hidedColumns = $hidedColumns; $this->html = new Html(); }
public function getDatagrid($data) { $parser = new Parser(); $output = $this->html->el('div')->addAttributes(array('class' => 'datagride')); $rows = $parser->dataToRows($data, $this->hidedColumns); $this->buildTable($rows, $output); $this->buildFooter($output); return $output; }
public function __construct(array $actions, Row $row) { $parser = new Parser(); $this->actionButtons = $parser->actionsToActionButtons($actions, $row); $this->html = new Html(); }