= GridView::widget([
'dataProvider' => $dataProvider,
'filterModel' => $searchModel,
'columns' => [
[
'attribute' => 'title',
'value' => function (BannerPlace $model) {
return Html::a(Html::encode($model->title), ['view', 'id' => $model->id]);
},
'format' => 'raw',
],
'width',
'height',
[
'attribute' => 'active',
'filter' => BannerHelper::statusList(),
'format' => 'raw',
'value' => function(BannerPlace $place) {
return BannerHelper::statusLabel($place->active);
},
'options' => ['style' => 'width: 150px;'],
'contentOptions' => ['class' => 'text-center'],
],
[
'class' => ActionColumn::class,
'options' => ['style' => 'width: 100px;'],
'contentOptions' => ['class' => 'text-center'],
],
],
]); ?>