<?php
use yii\grid\ActionColumn;
use yii\grid\Column;
use yii\grid\GridView;
use common\modules\blog\models\Article;
use common\models\Language;

echo GridView::widget([
    'dataProvider' => $dataProvider,
    'columns' => [
        'id',
        'code',
        'create_at',
        [
            'value' => function($data) {
                return $data->author0->firstname.' '.$data->author0->lastname;
            },
            'header' => Yii::t('app', 'Author')
        ],
        [
            'class' => Column::className(),
            'header' => Yii::t('app', 'Name'),
            'content' => function($model, $key, $index, $column) {
                return $model->getArticleLangs()->where(['language_id' => Language::getDefaultLang()->language_id])->one()->name;
            }
        ],
        [
            'class' => ActionColumn::className(),
            'template' => '{update} {delete}'
        ]
    ]
]);