예제 #1
0
 /**
  * Updates an existing Project model.
  * If update is successful, the browser will be redirected to the 'view' page.
  * @param integer $id
  * @return mixed
  */
 public function actionUpdate($id)
 {
     $model = $this->findModel($id);
     $searchModelStream = new StreamSearch();
     $dataProviderStream = $searchModelStream->search(Yii::$app->request->queryParams);
     if ($model->load(Yii::$app->request->post()) && $model->save()) {
         return $this->redirect(['index', 'id' => $model->pr_id]);
     } else {
         return $this->render('update', ['model' => $model, 'searchModelStream' => $searchModelStream, 'dataProviderStream' => $dataProviderStream]);
     }
 }
예제 #2
0
 /**
  * Lists all Stream models.
  * @return mixed
  */
 public function actionIndex()
 {
     $searchModel = new StreamSearch();
     $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
     return $this->render('index', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider]);
 }