Exemplo n.º 1
0
 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>';
 }
Exemplo n.º 2
0
 /**
  * @param \Eva\Form\Form $form
  * @return string
  */
 public function render($form)
 {
     $renderer = new Renderer();
     $this->prepare($form);
     return $renderer->render($form);
 }