protected function findModel($name) { if (($model = \app\modules\admin\models\rbac\Role::find($name)) !== null) { return $model; } else { throw new NotFoundHttpException(Yii::t('rbac', 'The requested page does not exist.')); } }