本文整理汇总了PHP中CGridView::renderItems方法的典型用法代码示例。如果您正苦于以下问题:PHP CGridView::renderItems方法的具体用法?PHP CGridView::renderItems怎么用?PHP CGridView::renderItems使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CGridView
的用法示例。
在下文中一共展示了CGridView::renderItems方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: renderItems
/**
* Renders the data items for the grid view.
*/
public function renderItems()
{
if ($this->extended && $this->filter) {
$this->insertDropdownHtml();
$this->insertModelAttributes();
}
parent::renderItems();
if ($this->enableCustomActions === true) {
$this->widget('zii.widgets.CMenu', array('id' => $this->getId() . 'Actions', 'htmlOptions' => array('class' => 'gridFooterActions'), 'items' => $this->getCustomActions()));
}
}
示例2: renderItems
/**
* Renders the data items for the grid views.
*/
public function renderItems() {
if(Yii::app()->user->hasFlash('CQTeeGridView')) {
print '<div style="background-color:#ffeeee;padding:7px;border:2px solid #cc0000;">'. Yii::app()->user->getFlash("CQTeeGridView") . '</div>';
}
parent::renderItems();
}
示例3: renderItems
/**
* Renders the data items for the grid view.
*/
public function renderItems()
{
if ($this->enableHeader) {
//$this->enableHeader
$params = array();
if (isset($this->name)) {
$params['title'] = $this->name;
}
if ($this->headerOptions && $this->autoColumns) {
$params['options'] = array(array('label' => self::t('CHANGE_TABLE'), 'icon' => 'icon-table-2', 'href' => 'javascript:grid.editcolums("' . $this->id . '","' . $this->dataProvider->modelClass . '","' . $this->controller->module->id . '");'));
}
if (isset($this->headerButtons)) {
$params['buttons'] = $this->headerButtons;
}
Yii::app()->tpl->openWidget($params);
}
echo Html::openTag('div', array('class' => 'table-responsive'));
parent::renderItems();
echo Html::closeTag('div');
if ($this->selectableRows > 0 && $this->enableCustomActions === true && count($this->dataProvider->getData()) > 0) {
//echo '<select class="CA" name="test" onChange="customActions(this);">';
if ($this->enableCustomActions === true) {
$this->widget('zii.widgets.CMenu', array('id' => $this->getId() . 'Actions', 'encodeLabel' => false, 'submenuHtmlOptions' => array('class' => 'dropdown-menu'), 'htmlOptions' => array('class' => 'btn-group dropup gridActions'), 'items' => array(array('label' => 'Выбрать действие <span class="caret"></span>', 'url' => '#', 'linkOptions' => array('class' => 'btn btn-sm btn-default', 'data-toggle' => 'dropdown', 'aria-haspopup' => "true", 'aria-expanded' => "false"), 'items' => $this->getCustomActions()))));
}
}
$this->renderPager();
if ($this->enableHeader) {
//$this->autoColumns &&
Yii::app()->tpl->closeWidget();
}
}
示例4: renderItems
/**
*
*/
public function renderItems()
{
if ($this->export) {
$export = array();
foreach ($this->columns as $column) {
/** @var $column CDataColumn */
$export['headers'][] = $column->header ? $column->header : $column->name;
}
$data = $this->dataProvider->getData();
foreach ($data as $row => $line) {
foreach ($this->columns as $column) {
$export[$row][] = '"' . str_replace('"', '""', $column->renderDataCell($row)) . '"';
}
}
echo implode(",", $export['headers']) . "\n";
unset($export['headers']);
foreach ($export as $key => $value) {
echo implode(",", $value) . "\n";
}
} else {
parent::renderItems();
}
}