Total Complexity | 3 |
Total Lines | 39 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
20 | class LocationExtension extends DataExtension |
||
21 | { |
||
22 | |||
23 | /** |
||
24 | * @var array |
||
25 | */ |
||
26 | private static $has_one = [ |
||
|
|||
27 | 'MarkerIconImage' => Image::class, |
||
28 | ]; |
||
29 | |||
30 | /** |
||
31 | * @var array |
||
32 | */ |
||
33 | private static $owns = [ |
||
34 | 'MarkerIconImage', |
||
35 | ]; |
||
36 | |||
37 | public function updateCMSFields(FieldList $fields) |
||
38 | { |
||
39 | parent::updateCMSFields($fields); |
||
40 | |||
41 | $fields->insertAfter( |
||
42 | 'Fax', |
||
43 | UploadField::create('MarkerIconImage', 'MarkerIcon') |
||
44 | ); |
||
45 | } |
||
46 | |||
47 | /** |
||
48 | * @return Image|string |
||
49 | */ |
||
50 | public function MarkerIcon() |
||
59 | } |
||
60 | } |
||
61 |