public function __construct(DataTable $dataTable) { parent::__construct($dataTable); $cell = new MarkupContainer('cell'); $this->add($cell); $cell->add(new AttributeModifier('colspan', new BasicModel(count($dataTable->getColumns())))); $cell->add(new Navigator('nav', $dataTable)); }
public function __construct(DataTable $dataTable) { parent::__construct($dataTable); $headings = new RepeatingView('head'); foreach ($dataTable->getColumns() as $column) { $header = new MarkupContainer($headings->getNextChildId()); $headings->add($header); $header->add(new Label('heading', new BasicModel($column->getHeading()))); } $this->add($headings); }