當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。