/**
* @return \yii\db\ActiveQuery
*/
public function getAuthorsBooks()
{
return $this->hasMany(AuthorsBooks::className(), ['authors_id' => 'id'])->viaTable('books', ['id' => 'books_id']);
}
....
[
'attribute'=>'authorsBooks',
'value'=>function($model){
return implode(',',ArrayMap::getColumn($model->authorsBooks,'name'));
}
]
...
public function getAutorsString(){
return implode(',',ArrayMap::getColumn($this->authorsBooks,'name'));
}
....
[
'attribute'=>'authorsBooks',
'value'=>'autorsString'
]
...