title = \Yii::t('blog', 'Blog Articles'); $this->params[ 'breadcrumbs' ][] = $this->title; ?>
$this->title, ] ); ?>

'Blog Article' ]), [ 'create' ], [ 'class' => 'btn btn-success' ] ) ?>

$dataProvider, 'filterModel' => $searchModel, 'columns' => [ 'id', [ 'attribute' => 'title', 'value' => 'lang.title', ], [ 'attribute' => 'tag', 'label' => \Yii::t('catalog', 'Tags'), 'value' => function (Article $model) { if (empty($model->tags)) { return \Yii::$app->formatter->asText(null); } else { return implode( ',
', ArrayHelper::getColumn( $model->tags, function (Tag $tag) { return $tag->lang->label; } ) ); } }, 'format' => 'html', ], [ 'attribute' => 'image_id', 'value' => function (Article $model) { if (empty($model->image_id)) { return ''; } else { return $model->image->getImg( [ 'width' => '300px', ] ); } }, 'format' => 'html', ], [ 'attribute' => 'status', 'value' => function (Article $model) { return ( !$model->status ) ? \Yii::t('blog', 'Not active') : \Yii::t('blog', 'Active'); }, 'filter' => [ 0 => \Yii::t('blog', 'Not active'), 1 => \Yii::t('blog', 'Active'), ], ], 'created_at:date', 'updated_at:date', [ 'class' => 'yii\grid\ActionColumn' ], ], ] ); ?>