本文整理匯總了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>';
}