protected function findModel($id) { if (($model = Rbac::findOne($id)) !== null) { return $model; } else { throw new NotFoundHttpException('The requested page does not exist.'); } }
<?php echo $form->field($user, 'email')->textInput(['maxlength' => 255]); echo $form->field($user, 'role')->dropDownList(\yii\helpers\ArrayHelper::map(\lenarx\rbac\models\Rbac::find()->all(), 'name', 'title'), ['prompt' => 'выберите группу']); echo $form->field($user, 'username')->textInput(['maxlength' => 255]); echo $form->field($user, 'password')->passwordInput();