<?php namespace myretail\controllers;use Yii;use mdm\admin\controllers\RoleController as BaseRoleController;use mdm\admin\models\AuthItem;class RoleController extends BaseRoleController{public function actionCreate(){$model=new AuthItem(null);$model->type=$this->type;if($model->load(Yii::$app->getRequest()->post())&&$model->save()){Yii::$app->session->setFlash('success',"The role has been created successfully.");return $this->redirect(['index']);}else{return $this->render('create',['model'=>$model]);}}public function actionUpdate($id){$model=$this->findModel($id);if($model->load(Yii::$app->getRequest()->post())&&$model->save()){Yii::$app->session->setFlash('success',"The role has been updated successfully.");return $this->redirect(['index']);}return $this->render('update',['model'=>$model]);}}