@@ 29-51 (lines=23) @@ | ||
26 | /** |
|
27 | * @inheritdoc |
|
28 | */ |
|
29 | protected function idRules() |
|
30 | { |
|
31 | ||
32 | return [ |
|
33 | [ |
|
34 | [ |
|
35 | 'id' |
|
36 | ], |
|
37 | 'number', |
|
38 | 'integerOnly' => true |
|
39 | ], |
|
40 | [ |
|
41 | [ |
|
42 | 'id' |
|
43 | ], |
|
44 | 'safe', |
|
45 | 'on' => [ |
|
46 | ModelHelper::SCENARIO_DEFAULT |
|
47 | ] |
|
48 | ] |
|
49 | ]; |
|
50 | ||
51 | } |
|
52 | ||
53 | /** |
|
54 | * @inheritdoc |
@@ 25-47 (lines=23) @@ | ||
22 | /** |
|
23 | * @inheritdoc |
|
24 | */ |
|
25 | protected function idRules() |
|
26 | { |
|
27 | ||
28 | return [ |
|
29 | [ |
|
30 | [ |
|
31 | 'id' |
|
32 | ], |
|
33 | 'number', |
|
34 | 'integerOnly' => true |
|
35 | ], |
|
36 | [ |
|
37 | [ |
|
38 | 'id' |
|
39 | ], |
|
40 | 'safe', |
|
41 | 'on' => [ |
|
42 | RecordHelper::SCENARIO_DEFAULT |
|
43 | ] |
|
44 | ] |
|
45 | ]; |
|
46 | ||
47 | } |
|
48 | ||
49 | /** |
|
50 | * @inheritdoc |
@@ 171-194 (lines=24) @@ | ||
168 | /** |
|
169 | * @return array |
|
170 | */ |
|
171 | protected function userRules(): array |
|
172 | { |
|
173 | ||
174 | return [ |
|
175 | [ |
|
176 | [ |
|
177 | 'userId' |
|
178 | ], |
|
179 | 'number', |
|
180 | 'integerOnly' => true |
|
181 | ], |
|
182 | [ |
|
183 | [ |
|
184 | 'userId', |
|
185 | 'user' |
|
186 | ], |
|
187 | 'safe', |
|
188 | 'on' => [ |
|
189 | ModelHelper::SCENARIO_DEFAULT |
|
190 | ] |
|
191 | ] |
|
192 | ]; |
|
193 | ||
194 | } |
|
195 | ||
196 | /** |
|
197 | * @return array |