admin/controllers/MenuItemController.php
/**
     * Updates an existing MenuItem model.
     * If update is successful, the browser will be redirected to the 'view' page.
     * @param integer $id
     * @return mixed
     */
Updates an existing MenuItem model.
If update is successful, the browser will be redirected to the 'view' page.
@param integer $id
@return mixed
Updates an existing MenuItem 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->findModelMulti($id);
        if ($model->load(Yii::$app->request->post()) && $model->save()) {
            return $this->redirect(['index', 'MenuItemSearch[menu_id]' => $model->menu_id, 'MenuItemSearch[parent_id]' => $model->parent_id]);
        } else {
            return $this->render('update', [
                'model' => $model,
            ]);
        }
    }
public function actionUpdate ( $ id ) { $ model = $ this -> findModelMulti ( $ id ) ; if ( $ model -> load ( Yii :: $ app -> request -> post ( ) ) && $ model -> save ( ) ) { return $ this -> redirect ( [ 'index' , 'MenuItemSearch[menu_id]' => $ model -> menu_id , 'MenuItemSearch[parent_id]' => $ model -> parent_id ] ) ; } else { return $ this -> render ( 'update' , [ 'model' => $ model , ] ) ; } }
Updates an existing MenuItem model.
Updates an existing MenuItem model .