Total Complexity | 3 |
Total Lines | 51 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
14 | class SectionField extends base\SectionField implements Contract |
||
15 | { |
||
16 | use ContractTrait { |
||
17 | getLinks as getContractLinks; |
||
18 | } |
||
19 | |||
20 | /** |
||
21 | * @inheritdoc |
||
22 | */ |
||
23 | protected $sectionClass = Section::class; |
||
24 | |||
25 | /** |
||
26 | * @inheritdoc |
||
27 | */ |
||
28 | protected $fieldClass = Field::class; |
||
29 | |||
30 | /** |
||
31 | * @inheritdoc |
||
32 | */ |
||
33 | protected $solicitudeValueClass = SolicitudeValue::class; |
||
34 | |||
35 | /** |
||
36 | * @inheritdoc |
||
37 | */ |
||
38 | 4 | public function getLinks() |
|
39 | { |
||
40 | 4 | $selfLink = $this->getSelfLink(); |
|
|
|||
41 | |||
42 | 4 | return array_merge($this->getContractLinks(), [ |
|
43 | 4 | 'field' => $this->field->getSelfLink(), |
|
44 | ]); |
||
45 | } |
||
46 | |||
47 | /** |
||
48 | * @inheritdoc |
||
49 | */ |
||
50 | 5 | protected function slugBehaviorConfig(): array |
|
51 | { |
||
52 | return [ |
||
53 | 5 | 'idAttribute' => 'field_id', |
|
54 | 'resourceName' => 'field', |
||
55 | 'parentSlugRelation' => 'section', |
||
56 | ]; |
||
57 | } |
||
58 | |||
59 | /** |
||
60 | * @inheritdoc |
||
61 | */ |
||
62 | 4 | public function extraFields() |
|
65 | } |
||
66 | } |
||
67 |