From 00871f3fc23b69585656a9cbc3cf69a3720c77ec Mon Sep 17 00:00:00 2001 From: kriss <462679766@qq.com> Date: Fri, 7 Sep 2018 14:41:16 +0800 Subject: [PATCH] feat: SimpleDynaGrid widget --- generators/crud/default/views/index.php | 6 ++---- generators/dynagrid/default/views/index.php | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/generators/crud/default/views/index.php b/generators/crud/default/views/index.php index 7613e7a..a5037c6 100644 --- a/generators/crud/default/views/index.php +++ b/generators/crud/default/views/index.php @@ -60,10 +60,9 @@ ]; -$simpleDynaGrid = new SimpleDynaGrid([ - 'dynaGridId' => 'dynagrid-getControllerID()?>-index', - 'columns' => $columns, +echo SimpleDynaGrid::widget([ 'dataProvider' => $dataProvider, + 'columns' => $columns, 'extraToolbar' => [ [ @@ -72,4 +71,3 @@ ] ]); -$simpleDynaGrid->renderDynaGrid(); diff --git a/generators/dynagrid/default/views/index.php b/generators/dynagrid/default/views/index.php index b9677f1..de65d31 100644 --- a/generators/dynagrid/default/views/index.php +++ b/generators/dynagrid/default/views/index.php @@ -64,10 +64,9 @@ ]; -$simpleDynaGrid = new SimpleDynaGrid([ - 'dynaGridId' => 'dynagrid-getControllerID()?>-actionIndex?>', - 'columns' => $columns, +echo SimpleDynaGrid::widget([ 'dataProvider' => $dataProvider, + 'columns' => $columns, ]); -$simpleDynaGrid->renderDynaGrid();