Total Complexity | 3 |
Total Lines | 49 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
15 | class FieldRuleProperty extends base\FieldRuleProperty implements Contract |
||
16 | { |
||
17 | use ContractTrait { |
||
18 | getLinks as getContractLinks; |
||
19 | } |
||
20 | |||
21 | /** |
||
22 | * @inheritdoc |
||
23 | */ |
||
24 | protected $ruleClass = FieldRule::class; |
||
25 | |||
26 | /** |
||
27 | * @inheritdoc |
||
28 | */ |
||
29 | 4 | public function getLinks() |
|
30 | { |
||
31 | 4 | $selfLink = $this->getSelfLink(); |
|
32 | |||
33 | 4 | return array_merge($this->getContractLinks(), [ |
|
34 | 4 | 'properties' => $selfLink . '/property', |
|
35 | 'curies' => [ |
||
36 | 4 | new Link([ |
|
37 | 4 | 'name' => 'nestable', |
|
38 | 4 | 'href' => Url::to($selfLink, ['expand' => '{rel}']), |
|
|
|||
39 | 4 | 'title' => 'Embeddable and Nestable related resources.', |
|
40 | ]), |
||
41 | ], |
||
42 | 4 | 'nestable:rule' => 'rule', |
|
43 | ]); |
||
44 | } |
||
45 | |||
46 | /** |
||
47 | * @inheritdoc |
||
48 | */ |
||
49 | 5 | protected function slugBehaviorConfig(): array |
|
55 | ]; |
||
56 | } |
||
57 | |||
58 | /** |
||
59 | * @inheritdoc |
||
60 | */ |
||
61 | 4 | public function extraFields() |
|
64 | } |
||
65 | } |
||
66 |