public function run() { $view = $this->renderOnlyComments ? 'onlyComments' : 'comments'; $this->registerJs(); $dataProvider = new ActiveDataProvider(['query' => Comment::find(['page_id' => $this->pageID])->joinWith('user')->orderBy('date'), 'pagination' => false]); echo $this->render($view, ['comments' => $dataProvider]); }