controllers/DefaultController.php
public function actionTaskUpdate($id)
    {
        $model = Project::getTaskModel($id);
        if (!isset($model)) {
            throw new NotFoundHttpException('The Task "' . $id . '" not found.');
        }
        if ($model->load(Yii::$app->request->post()) && $model->save()) {
            return $this->redirect(['taskview', 'id' => $model->id,]);
        } else {
            return $this->render('taskupdate', [
                'model' => $model,
            ]);
        }
    }
public function actionTaskUpdate($id)
    {
        $model = Project::getTaskModel($id);
        if (!isset($model)) {
            throw new NotFoundHttpException('The Task "' . $id . '" not found.');
        }
        if ($model->load(Yii::$app->request->post()) && $model->save()) {
            return $this->redirect(['taskview', 'id' => $model->id,]);
        } else {
            return $this->render('taskupdate', [
                'model' => $model,
            ]);
        }
    }
public function actionTaskUpdate ( $ id ) { $ model = Project :: getTaskModel ( $ id ) ; if ( ! isset ( $ model ) ) { throw new NotFoundHttpException ( 'The Task "' . $ id . '" not found.' ) ; } if ( $ model -> load ( Yii :: $ app -> request -> post ( ) ) && $ model -> save ( ) ) { return $ this -> redirect ( [ 'taskview' , 'id' => $ model -> id , ] ) ; } else { return $ this -> render ( 'taskupdate' , [ 'model' => $ model , ] ) ; } }
Updates an existing Task model.
If update is successful, the browser will be redirected to the 'view' page.
@param integer $id
@return mixed
@throws NotFoundHttpException
Updates an existing Task model . If update is successful the browser will be redirected to the view page .