Exemplo n.º 1
0
 /**
  * Displays a single Forum model.
  * @param integer $id
  * @return mixed
  */
 public function actionView($id)
 {
     $model = $this->findModel($id);
     $topicSearchModel = new TopicSearch();
     $topicDataProvider = $topicSearchModel->search(Yii::$app->request->queryParams + [$topicSearchModel->formName() => ['fid' => $model->getPrimaryKey()]]);
     return $this->render('view', ['model' => $model, 'topicDataProvider' => $topicDataProvider]);
 }