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


PHP GridView::run方法代码示例

本文整理汇总了PHP中yii\grid\GridView::run方法的典型用法代码示例。如果您正苦于以下问题:PHP GridView::run方法的具体用法?PHP GridView::run怎么用?PHP GridView::run使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在yii\grid\GridView的用法示例。


在下文中一共展示了GridView::run方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: run

    public function run(){

        if($this->is_pjax){
            Pjax::begin($this->pjaxOptions);
        }

        parent::run();

        if($this->isShowForm) {
            echo PageSize::widget([
                'model'     => $this->filterModel,
                'attribute' => $this->attribute,
                'options'   => [
                    'data-pjax' => '0',
                ],
            ]);
        }

        if($this->is_pjax){
            Pjax::end();
        }

        echo ModelCrud::widget([
            'size' => $this->modalSize,
            'updateUrl' => ($this->updateUrl)? $this->updateUrl : Url::to(['update']),
            'createUrl' => ($this->createUrl)? $this->createUrl : Url::to(['create']),
            'updateVerb' => 'post',
            'viewUrl' => Url::to(['view']),
            'viewVerb' => 'post',
            'createVerb' => 'post',
            'modelTitle' => $this->modelTitle,
            'template' => '{view}{update}{create}',
            'modelClass' =>  $this->dataProvider->query->modelClass
        ]);
    }
开发者ID:harish-reglobbe,项目名称:Auction,代码行数:35,代码来源:GridView.php

示例2: run

 /**
  * Runs the widget.
  */
 public function run()
 {
     $this->pjaxBegin();
     parent::run();
     $this->registerAsset();
     $this->pjaxEnd();
 }
开发者ID:Liv1020,项目名称:cms,代码行数:10,代码来源:GridView.php

示例3: run

 public function run()
 {
     $this->prepareVisibilityColumns();
     echo Html::beginTag('div', ['class' => 'kak-grid']);
     parent::run();
     echo Html::endTag('div');
 }
开发者ID:sanchezzzhak,项目名称:kak-grid,代码行数:7,代码来源:GridView.php

示例4: run

 public function run()
 {
     parent::run();
     echo '</div>';
     if (!$this->options['ajax']) {
         $this->registerClientScripts();
         DataTablesAsset::register($this->getView());
     }
 }
开发者ID:andreosoft,项目名称:andreocms,代码行数:9,代码来源:GridViewEdited.php

示例5: run

 /**
  * @inheritdoc
  */
 public function run()
 {
     $loaderJs = '$(document).ready(function () {
             $(".grid-view-loading").show();
             $(".grid-view-loading").css("display", "block !important");
             $(".grid-view-loading").css("opacity", "1 !important");
     });';
     $this->getView()->registerJs($loaderJs);
     return parent::run();
 }
开发者ID:SimonBaeumer,项目名称:humhub,代码行数:13,代码来源:GridView.php

示例6: run

 /**
  * Runs the widget.
  */
 public function run()
 {
     parent::run();
     $view = $this->getView();
     AdminDataTableAsset::register($view);
     $id = $this->options['id'];
     $view->registerJs('var extensions =' . Json::encode($this->datatable_options) . ' ;', View::POS_READY);
     $view->registerJs('$.extend($.fn.dataTableExt.oStdClasses, extensions);', View::POS_READY);
     $view->registerJs('var ' . $id . ' = $(".' . $this->tableDataClass . '").dataTable();', View::POS_READY);
 }
开发者ID:rajanishtimes,项目名称:basicyii,代码行数:13,代码来源:DataTable.php

示例7: run

 public function run()
 {
     foreach ($this->columns as $column) {
         if (property_exists($column, 'enableSorting')) {
             $column->enableSorting = false;
         }
     }
     parent::run();
     $options = ['id' => $this->id, 'action' => $this->sortUrl, 'sortingPromptText' => $this->sortingPromptText, 'sortingFailText' => $this->failText, 'csrfTokenName' => \Yii::$app->request->csrfParam, 'csrfToken' => \Yii::$app->request->csrfToken];
     $options = Json::encode($options);
     $this->view->registerJs("jQuery.SortableGridView({$options});");
 }
开发者ID:richardfan1126,项目名称:yii2-sortable-gridview,代码行数:12,代码来源:SortableGridView.php

示例8: run

 public function run()
 {
     $view = $this->getView();
     SortableAsset::register($view);
     $options = '';
     if ($this->sortOptions !== null) {
         $options = Json::encode($this->sortOptions);
     }
     $id = $this->options['id'];
     $view->registerJs("jQuery('#{$id} table tbody').sortable({$options});");
     parent::run();
 }
开发者ID:tsvetann,项目名称:sortablegridview,代码行数:12,代码来源:SortableGridview.php

示例9: run

 public function run()
 {
     //$this->test();
     $this->init_provider();
     $this->init_excel_sheet();
     $this->initPHPExcelWriter('Excel5');
     $this->generateHeader();
     $row = $this->generateBody();
     $writer = $this->_objPHPExcelWriter;
     $this->setHttpHeaders();
     $writer->save('php://output');
     Yii::$app->end();
     //$writer->save('test.xlsx');
     parent::run();
 }
开发者ID:filimonchuk93,项目名称:monitoring.my,代码行数:15,代码来源:ExcelGrid.php

示例10: run

 public function run()
 {
     if ($this->box) {
         if ($this->responsive) {
             $this->box['body']['class'] = 'table-responsive';
         }
         self::boxBegin($this->box);
     } elseif ($this->responsive) {
         Html::beginTag('div', ['class' => 'table-responsive']);
     }
     parent::run();
     if ($this->box) {
         self::boxEnd();
     } elseif ($this->responsive) {
         Html::endTag('div');
     }
 }
开发者ID:AlvaCorp,项目名称:yii2-adminlte-demo,代码行数:17,代码来源:Table.php

示例11: run

 /**
  * @inheritdoc
  * @throws InvalidConfigException
  */
 public function run()
 {
     $this->initToggleData();
     $this->initExport();
     if ($this->export !== false && isset($this->exportConfig[self::PDF])) {
         \kartik\base\Config::checkDependency('mpdf\\Pdf', 'yii2-mpdf', "for PDF export functionality. To include PDF export, follow the install steps below. If you do not " . "need PDF export functionality, do not include 'PDF' as a format in the 'export' property. You can " . "otherwise set 'export' to 'false' to disable all export functionality");
     }
     $this->initHeader();
     $this->initBootstrapStyle();
     $this->containerOptions['id'] = $this->options['id'] . '-container';
     Html::addCssClass($this->containerOptions, 'kv-grid-container');
     $this->registerAssets();
     $this->renderPanel();
     $this->initLayout();
     $this->beginPjax();
     parent::run();
     $this->endPjax();
 }
开发者ID:hscstudio,项目名称:psiaga,代码行数:22,代码来源:GridView.php

示例12: run

 public function run()
 {
     $this->trigger(self::EVENT_BEFORE_RUN);
     parent::run();
     $this->trigger(self::EVENT_AFTER_RUN);
 }
开发者ID:consultnn,项目名称:yii2-custom-grid,代码行数:6,代码来源:GridView.php

示例13: run

 /**
  * @inheritdoc
  */
 public function run()
 {
     parent::run();
     DataTablesAsset::register($this->getView());
 }
开发者ID:luobenyu,项目名称:yii2-start-themes,代码行数:8,代码来源:GridView.php

示例14: run

 public function run()
 {
     $this->registerResizableColumns();
     parent::run();
 }
开发者ID:hiqdev,项目名称:yii2-higrid,代码行数:5,代码来源:GridView.php

示例15: run

 public function run()
 {
     GridViewAsset::register($this->view);
     parent::run();
 }
开发者ID:humanized,项目名称:yii2-translation,代码行数:5,代码来源:GridView.php


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