本文整理汇总了PHP中yii\grid\GridView::renderItems方法的典型用法代码示例。如果您正苦于以下问题:PHP GridView::renderItems方法的具体用法?PHP GridView::renderItems怎么用?PHP GridView::renderItems使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类yii\grid\GridView
的用法示例。
在下文中一共展示了GridView::renderItems方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: renderItems
/**
*
* 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]);
}
示例2: renderItems
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();
}
示例3: renderItems
/**
* Renders the data models for the grid view.
*/
public function renderItems()
{
return '<div class="table-responsive">' . parent::renderItems() . '</div>';
}