本文整理汇总了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
]);
}
示例2: run
/**
* Runs the widget.
*/
public function run()
{
$this->pjaxBegin();
parent::run();
$this->registerAsset();
$this->pjaxEnd();
}
示例3: run
public function run()
{
$this->prepareVisibilityColumns();
echo Html::beginTag('div', ['class' => 'kak-grid']);
parent::run();
echo Html::endTag('div');
}
示例4: run
public function run()
{
parent::run();
echo '</div>';
if (!$this->options['ajax']) {
$this->registerClientScripts();
DataTablesAsset::register($this->getView());
}
}
示例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();
}
示例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);
}
示例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});");
}
示例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();
}
示例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();
}
示例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');
}
}
示例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();
}
示例12: run
public function run()
{
$this->trigger(self::EVENT_BEFORE_RUN);
parent::run();
$this->trigger(self::EVENT_AFTER_RUN);
}
示例13: run
/**
* @inheritdoc
*/
public function run()
{
parent::run();
DataTablesAsset::register($this->getView());
}
示例14: run
public function run()
{
$this->registerResizableColumns();
parent::run();
}
示例15: run
public function run()
{
GridViewAsset::register($this->view);
parent::run();
}