modules/adminos/controllers/ArticlesController.php
/**
     * Updates an existing Articles model.
     * If update is successful, the browser will be redirected to the 'view' page.
     * @param string $id
     * @return mixed
     */
Updates an existing Articles model.
If update is successful, the browser will be redirected to the 'view' page.
@param string $id
@return mixed
Updates an existing Articles model . If update is successful the browser will be redirected to the ' view ' page . @param string $id @return mixed
public function actionUpdate($id)
    {
        $model = $this->findModel($id);
        $article = Articles::findOne($id);
        $this->setMeta('редактирование статьи: ' . $article->title, $article->keywords, $article->description);
        if ($model->load(Yii::$app->request->post()) && $model->save()) {
            return $this->redirect(['view', 'id' => $model->id]);
        } else {
            return $this->render('update', [
                'model' => $model,
            ]);
        }
    }
public function actionUpdate ( $ id ) { $ model = $ this -> findModel ( $ id ) ; $ article = Articles :: findOne ( $ id ) ; $ this -> setMeta ( 'редактирование статьи: ' . $article->title,  a t icle->k ey words , $ article -> descript i n ); if ( $ model -> load ( Yii :: $ app -> request -> post ( ) ) && $ model -> save ( ) ) { return $ this -> redirect ( [ 'view' , 'id' => $ model -> id ] ) ; } else { return $ this -> render ( 'update' , [ 'model' => $ model , ] ) ; } }
Updates an existing Articles model.
Updates an existing Articles model .