public function actionUpdate($id)
    {
        $model = $this->findModel($id);
        if (!\Yii::$app->user->can('update', ['model' => $model]))
            throw new ForbiddenHttpException(Module::t('metaTag', 'Access denied.'));
        
        if ($model->load(\Yii::$app->request->post()) && $model->save()) {
            return $this->redirect(['index']);
        } else {
            return $this->render('update', [
                'model' => $model,
            ]);
        }
    }
public function actionUpdate($id)
    {
        $model = $this->findModel($id);
        if (!\Yii::$app->user->can('update', ['model' => $model]))
            throw new ForbiddenHttpException(Module::t('metaTag', 'Access denied.'));
        
        if ($model->load(\Yii::$app->request->post()) && $model->save()) {
            return $this->redirect(['index']);
        } else {
            return $this->render('update', [
                'model' => $model,
            ]);
        }
    }
public function actionUpdate ( $ id ) { $ model = $ this -> findModel ( $ id ) ; if ( ! \ Yii :: $ app -> user -> can ( 'update' , [ 'model' => $ model ] ) ) throw new ForbiddenHttpException ( Module :: t ( 'metaTag' , 'Access denied.' ) ) ; if ( $ model -> load ( \ Yii :: $ app -> request -> post ( ) ) && $ model -> save ( ) ) { return $ this -> redirect ( [ 'index' ] ) ; } else { return $ this -> render ( 'update' , [ 'model' => $ model , ] ) ; } }
Updates an existing MetaTag model.
If update is successful, the browser will be redirected to the 'view' page.
@param integer $id
@return mixed
Updates an existing MetaTag model . If update is successful the browser will be redirected to the view page .