/** * 通过授权任务反查授权过的角色 * @author lixupeng * @param int $id 授权任务ID */ public function actionRelatedRole($id) { $authtaskObj = self::findModel($id); $model = new models\RbacRoleTask(); $model->scenario = 'search'; $dataProvider = $model->search([$model->formName() => ['task_id' => $authtaskObj->task_id]]); return $this->render('/rbac/authtask/relatedRole', ['model' => $model, 'authtaskObj' => $authtaskObj, 'dataProvider' => $dataProvider]); }