Example #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]);
 }
Example #2
0
 /**
  * Lists all Topic models.
  * @return mixed
  */
 public function actionIndex()
 {
     $searchModel = new TopicSearch();
     $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
     return $this->render('index', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider]);
 }