title = Yii::t('banners', 'Banners'); $this->params['breadcrumbs'][] = $this->title; ?>

'btn btn-success']) ?>

$dataProvider, 'filterModel' => $searchModel, 'columns' => [ [ 'attribute' => 'title', 'value' => function (Banner $model) { return Html::a(Html::encode($model->title), ['view', 'id' => $model->id]); }, 'format' => 'raw', ], 'url:url', [ 'attribute' => 'start_at', 'value' => function(Banner $banner) { return date('d.m.Y H:i', $banner->start_at); }, 'options' => ['style' => 'width: 180px;'], ], [ 'attribute' => 'end_at', 'value' => function(Banner $banner) { return date('d.m.Y H:i', $banner->end_at); }, 'options' => ['style' => 'width: 180px;'], ], [ 'attribute' => 'place_id', 'filter' => ArrayHelper::map(BannerPlace::find()->all(), 'id', 'title'), 'value' => 'place.title', 'label' => Yii::t('banners', 'Place'), ], [ 'attribute' => 'target', 'filter' => BannerHelper::targetList(), 'value' => function(Banner $banner) { return BannerHelper::targetName($banner->target); }, 'options' => ['style' => 'width: 150px;'], 'contentOptions' => ['class' => 'text-center'], ], [ 'attribute' => 'active', 'filter' => BannerHelper::statusList(), 'format' => 'raw', 'value' => function(Banner $banner) { return BannerHelper::statusLabel($banner->active); }, 'options' => ['style' => 'width: 150px;'], 'contentOptions' => ['class' => 'text-center'], ], [ 'class' => ActionColumn::class, 'options' => ['style' => 'width: 100px;'], 'contentOptions' => ['class' => 'text-center'], ], ], ]); ?>