File tree 2 files changed +8
-6
lines changed
2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -52,11 +52,7 @@ public function init()
52
52
if (empty ($ this ->gridViewColumns )) {
53
53
$ this ->gridViewColumns = [
54
54
$ this ->idField ,
55
- $ this ->usernameField ,
56
- [
57
- 'class ' => 'yii\grid\ActionColumn ' ,
58
- 'template ' => '{view} '
59
- ]
55
+ $ this ->usernameField
60
56
];
61
57
}
62
58
Original file line number Diff line number Diff line change 1
1
<?php
2
2
3
3
use yii \grid \GridView ;
4
+ use yii \helpers \ArrayHelper ;
4
5
use yii \helpers \Html ;
5
6
use yii \widgets \Pjax ;
6
7
22
23
<?php echo GridView::widget ([
23
24
'dataProvider ' => $ dataProvider ,
24
25
'filterModel ' => $ searchModel ,
25
- 'columns ' => $ gridViewColumns
26
+ 'columns ' => ArrayHelper::merge ($ gridViewColumns , [
27
+ [
28
+ 'class ' => 'yii\grid\ActionColumn ' ,
29
+ 'template ' => '{view} '
30
+ ]
31
+ ])
26
32
]); ?>
27
33
28
34
<?php Pjax::end (); ?>
You can’t perform that action at this time.
0 commit comments