$topic_id]); /** * @var $post \app\models\News */ $post = Yii::$app->cache->getOrSet("main-page-wide-widget",function () use($topic_id){ return \app\models\News::find() ->alias('n') ->joinWith('topics') ->with('commentsAll') ->andWhere(['news_topic.id'=>$topic_id]) ->orderBy(['dt_pub'=>SORT_DESC]) ->one(); },600); ?>
image instanceof \app\models\base\Image):?>
<?=$post->photo_title?>

title?>

title?>
commentsAll; if(!is_null($comments)){ $count=count($comments); } else{ $count = 0; } ?> 0 || 1):?>