@@ -86,66 +86,6 @@ public static function find()
86
86
return $ query ;
87
87
}
88
88
89
- /**
90
- * @inheritdoc
91
- */
92
- public function rules ()
93
- {
94
- $ accessOwner = self ::accessColumnAttributes ()['owner ' ];
95
- $ accessRead = self ::accessColumnAttributes ()['read ' ];
96
- $ accessUpdate = self ::accessColumnAttributes ()['update ' ];
97
- $ accessDelete = self ::accessColumnAttributes ()['delete ' ];
98
- $ accessDomain = self ::accessColumnAttributes ()['domain ' ];
99
-
100
- // safe validator
101
- $ safe = [];
102
-
103
- // string validator
104
- $ string = [];
105
-
106
- // default validator
107
- $ default = [];
108
-
109
- // integer validator
110
- $ integer = [];
111
-
112
- // add used attributes to validation rules
113
- if ($ accessOwner ) {
114
- array_push ($ safe , $ accessOwner );
115
- array_push ($ integer , $ accessOwner );
116
- }
117
- if ($ accessRead ) {
118
- array_push ($ safe , $ accessRead );
119
- array_push ($ string , $ accessRead );
120
- array_push ($ default , $ accessRead );
121
- }
122
- if ($ accessUpdate ) {
123
- array_push ($ safe , $ accessUpdate );
124
- array_push ($ string , $ accessUpdate );
125
- array_push ($ default , $ accessUpdate );
126
- }
127
- if ($ accessDelete ) {
128
- array_push ($ safe , $ accessDelete );
129
- array_push ($ string , $ accessDelete );
130
- array_push ($ default , $ accessDelete );
131
- }
132
- if ($ accessDomain ) {
133
- array_push ($ safe , $ accessDomain );
134
- array_push ($ string , $ accessDomain );
135
- array_push ($ default , $ accessDomain );
136
- }
137
-
138
- return ArrayHelper::merge (
139
- parent ::rules (),
140
- [
141
- [$ safe , 'safe ' ],
142
- [$ string , 'string ' , 'max ' => 255 ],
143
- [$ default , 'default ' , 'value ' => null ],
144
- [$ integer , 'integer ' ]
145
- ]
146
- );
147
- }
148
-
149
89
/**
150
90
* @inheritdoc
151
91
*/
0 commit comments