=$topic->title?>
\app\models\News::find()->joinWith("topics t")->andWhere(["t.id"=>[$topic_id,]]),
"pagination" =>[
"pageSize"=>4
],
]
);
echo Yii::$app->cache->getOrSet("main-page-topic-widget-".$topic_id,function () use ($newsDataProvider){
return \yii\widgets\ListView::widget([
"dataProvider" => $newsDataProvider,
'options' => [
'tag' => false,
'class' => 'list-wrapper',
'id' => 'list-wrapper',
],
"itemOptions"=>[
"tag"=>false
],
"itemView" => "_topic_widget_item",
"layout" => "{items}"
]);
},1);
?>