backend/controllers/ModuleController.php
/**
     * Updates an existing Module model.
     * If update is successful, the browser will be redirected to the 'view' page.
     *
     * @param integer $id
     * @return mixed
     */
Updates an existing Module model.
If update is successful, the browser will be redirected to the 'view' page.

@param integer $id
@return mixed
Updates an existing Module 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);
        if ($model->load(Yii::$app->request->post())) {
            $model->config = Json::encode($model->config);
            if ($model->save()) {
                return $this->redirect(['index']);
            }
        }
        return $this->render('update', [
            'model' => $model,
        ]);
    }
public function actionUpdate ( $ id ) { $ model = $ this -> findModel ( $ id ) ; if ( $ model -> load ( Yii :: $ app -> request -> post ( ) ) ) { $ model -> config = Json :: encode ( $ model -> config ) ; if ( $ model -> save ( ) ) { return $ this -> redirect ( [ 'index' ] ) ; } } return $ this -> render ( 'update' , [ 'model' => $ model , ] ) ; }
Updates an existing Module model.
Updates an existing Module model .