@@ -72,15 +72,15 @@ Ok. That's done. Avaiable route now:
7272'modules' => [
7373 'rbac' => [
7474 'class' => 's4studio\rbacplus\Module',
75- 'userModelClassName'=> null,
76- 'userModelIdField'=> 'id',
77- 'userModelLoginField'=> 'username',
78- 'userModelLoginFieldLabel'=> null,
79- 'userModelExtraDataColumls'=> null,
80- 'beforeCreateController'=> null,
81- 'beforeAction'=> null
75+ 'userModelClassName' => null,
76+ 'userModelIdField' => 'id',
77+ 'userModelLoginField' => 'username',
78+ 'userModelLoginFieldLabel' => null,
79+ 'userModelExtraDataColumls' => null,
80+ 'beforeCreateController' => null,
81+ 'beforeAction' => null
8282 ]
83- ]
83+ ],
8484````
8585
8686+ <b >userModelClassName</b >: The user model class.<br >
@@ -94,20 +94,18 @@ Ok. That's done. Avaiable route now:
9494+ <b >userModelExtraDataColumls</b > The extra data columns you want to show in user assign views.<br >
9595 The default in assignment data gridview just display id and login column data. if you want to add created_at column you can add
9696```` php
97- 'userModelExtraDataColumls'=> [
97+ 'userModelExtraDataColumls' => [
9898 [
99- 'attributes'=>'created_at',
100- 'value'=>function($model){
101- return date('m/d/Y', $model->created_at);
102- }
99+ 'attributes' => 'created_at',
100+ 'format' => 'datetime',
103101 ]
104- ]
102+ ],
105103````
106104+ <b >beforeCreateController</b > The callable before create all controller of <b >Rbac Plus</b > module.
107105The default it is null. You need config this when you want to restrict access to <b >Rbac Plus</b > module.<br >
108106Example:
109107```` php
110- 'beforeCreateController'=> function($route){
108+ 'beforeCreateController' => function($route) {
111109 /**
112110 *@var string $route The route consisting of module, controller and action IDs.
113111 */
@@ -117,7 +115,7 @@ Example:
117115The default it is null. You need config this when you want to restrict access to any action in some controller of <b >Rbac Plus</b > module <BR >
118116Example:
119117```` php
120- 'beforeAction'=> function($action){
118+ 'beforeAction' => function($action) {
121119 /**
122120 *@var yii\base\Action $action the action to be executed.
123121 */
0 commit comments