controllers/ItemControllerAbstract.php
public function actionUpdate($name) {
        /** @var \jarrus90\User\models\Role|\jarrus90\User\models\Permission $model */
        $item = $this->getItem($name);
        $model = \Yii::createObject([
                    'class' => $this->modelClass,
                    'scenario' => 'update',
                    'item' => $item,
        ]);

        $this->performAjaxValidation($model);

        if ($model->load(\Yii::$app->request->post()) && $model->save()) {
            return $this->redirect(['index']);
        }

        return $this->render('update', [
                    'model' => $model,
        ]);
    }
public function actionUpdate($name) {
        /** @var \jarrus90\User\models\Role|\jarrus90\User\models\Permission $model */
        $item = $this->getItem($name);
        $model = \Yii::createObject([
                    'class' => $this->modelClass,
                    'scenario' => 'update',
                    'item' => $item,
        ]);

        $this->performAjaxValidation($model);

        if ($model->load(\Yii::$app->request->post()) && $model->save()) {
            return $this->redirect(['index']);
        }

        return $this->render('update', [
                    'model' => $model,
        ]);
    }
Shows update form.
@param  string $name
@return string|Response
@throws NotFoundHttpException
@throws \yii\base\InvalidConfigException