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