public function __invoke(\Eva\Grid\Grid $grid) { $tableHead = $this->renderTableHead($grid); $tableBody = $this->renderTableBody($grid); $grid->appendAttribute('class', 'table table-hover'); if ($grid->getSortable()) { $grid->appendAttribute('class', 'table-sortable'); } return '<table' . $this->renderer->createAttributesString($grid->getAttributes()) . '>' . $tableHead . $tableBody . '</table>'; }
/** * @param \Eva\Form\Form $form * @return string */ public function render($form) { $renderer = new Renderer(); $this->prepare($form); return $renderer->render($form); }