renderItems() public method

Renders the data models for the grid view.
public renderItems ( )
Esempio n. 1
0
 /**
  * 
  * I overrode it for making header and body separately
  * 
  */
 public function renderItems()
 {
     if (!$this->fixedHeader) {
         return parent::renderItems();
     }
     $content = array_filter([$this->renderCaption(), $this->renderColumnGroup(), $this->showHeader ? $this->renderTableHeader() : false]);
     $header = Html::tag('table', implode("\n", $content), $this->tableOptions);
     $content = array_filter([$this->renderCaption(), $this->renderColumnGroup(), $this->showFooter ? $this->renderTableFooter() : false, $this->renderTableBody()]);
     $body = Html::tag('table', implode("\n", $content), $this->tableOptions2 ?: $this->tableOptions);
     return strtr($this->fixedHeaderTemplate, ['{header}' => $header, '{body}' => $body]);
 }
Esempio n. 2
0
 public function renderItems()
 {
     if ($this->filterModel && $this->filterFields) {
         $view = $this->getView();
         $view->beginBlock('__ITEMS__');
         $formClass = $this->formClass;
         $this->_form = $formClass::begin($this->formConfig);
         echo parent::renderItems();
         $formClass::end();
         $view->endBlock();
         return $view->blocks['__ITEMS__'];
     }
     return parent::renderItems();
 }
Esempio n. 3
0
 /**
  * Renders the data models for the grid view.
  */
 public function renderItems()
 {
     return '<div class="table-responsive">' . parent::renderItems() . '</div>';
 }