1 | <?php |
||
16 | final class MandatoryDependency extends Resource |
||
17 | { |
||
18 | const FOO = 'foo'; |
||
19 | const MELLO = 'mello'; |
||
20 | const MANDATORY_MELLO = 'mandatory_mello'; |
||
21 | |||
22 | public function mandatory() |
||
23 | { |
||
24 | return [ |
||
25 | MandatoryDependency::FOO, |
||
26 | MandatoryDependency::MELLO => [ |
||
27 | 'when' => [ |
||
28 | 'property' => 'mandatory_mello', |
||
29 | 'condition' => 'is_present', |
||
30 | ] |
||
31 | ], |
||
32 | ]; |
||
33 | } |
||
34 | |||
35 | public function allowed() |
||
36 | { |
||
37 | return [ |
||
38 | MandatoryDependency::FOO, |
||
39 | MandatoryDependency::MELLO, |
||
40 | MandatoryDependency::MANDATORY_MELLO, |
||
41 | ]; |
||
42 | } |
||
43 | } |
||
44 |