File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -68,7 +68,6 @@ class Comment extends Widget
68
68
*/
69
69
public $ listViewConfig = [
70
70
'emptyText ' => '' ,
71
- 'layout ' => "{items} \n{pager} " ,
72
71
];
73
72
74
73
/**
@@ -199,9 +198,9 @@ protected function getClientOptions()
199
198
*/
200
199
protected function getCommentDataProvider ($ commentClass )
201
200
{
202
- $ dataProvider = new ArrayDataProvider ();
201
+ $ dataProvider = new ArrayDataProvider ($ this -> dataProviderConfig );
203
202
if (!isset ($ this ->dataProviderConfig ['allModels ' ])) {
204
- $ dataProvider ->setModels ( $ commentClass ::getTree ($ this ->entity , $ this ->entityId , $ this ->maxLevel ) );
203
+ $ dataProvider ->allModels = $ commentClass ::getTree ($ this ->entity , $ this ->entityId , $ this ->maxLevel );
205
204
}
206
205
207
206
return $ dataProvider ;
Original file line number Diff line number Diff line change 27
27
<?php echo ListView::widget (ArrayHelper::merge (
28
28
[
29
29
'dataProvider ' => $ commentDataProvider ,
30
+ 'layout ' => "{items} \n{pager} " ,
30
31
'itemView ' => '_list ' ,
31
32
'viewParams ' => [
32
33
'maxLevel ' => $ maxLevel ,
You can’t perform that action at this time.
0 commit comments