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); }
public function __construct($id, $columnId, $columns, $callback = null, $model = null) { parent::__construct($id, $model); if ($callback != null) { Args::callBackArgs($callback, 1, 'callback'); } $this->columns = $columns; $this->columnId = $columnId; $this->callback = $callback; }