当前位置: 首页>>代码示例>>PHP>>正文


PHP CGridView::renderItems方法代码示例

本文整理汇总了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()));
     }
 }
开发者ID:kolbensky,项目名称:rybolove,代码行数:14,代码来源:SGridView.php

示例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();
    }
开发者ID:nizsheanez,项目名称:PolymorphCMS,代码行数:10,代码来源:CQTreeGridView.php

示例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();
     }
 }
开发者ID:buildshop,项目名称:bs-common,代码行数:34,代码来源:GridView.php

示例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();
     }
 }
开发者ID:jankichaudhari,项目名称:yii-site,代码行数:26,代码来源:AdminGridView.php


注:本文中的CGridView::renderItems方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。