Example #1
0
 /**
  * Generates datagrid footer.
  * @return Html
  */
 protected function generateFooterRow()
 {
     $form = $this->dataGrid->getForm(TRUE);
     $paginator = $this->dataGrid->paginator;
     $row = $this->getWrapper('row.footer container');
     $count = count($this->dataGrid->getColumns());
     if ($this->dataGrid->hasOperations()) {
         $count++;
     }
     $cell = $this->getWrapper('row.footer cell container');
     $cell->colspan($count);
     $this->footerFormat = $this->dataGrid->translate($this->footerFormat);
     $html = str_replace(array('%operations%', '%paginator%', '%info%'), array($this->renderOperations(), $this->renderPaginator(), $this->renderInfo()), $this->footerFormat);
     $cell->setHtml($html);
     $row->add($cell);
     return $row;
 }