1 | <?php |
||
16 | class GoogleMapsField extends TextField |
||
17 | { |
||
18 | /** |
||
19 | * @var array |
||
20 | */ |
||
21 | protected $extraFields = [ |
||
22 | 'GoogleMapsLatField', |
||
23 | 'GoogleMapsLngField', |
||
24 | 'subpremise', |
||
25 | 'street_number', |
||
26 | 'route', |
||
27 | 'sublocality_level_1', |
||
28 | 'locality', |
||
29 | 'administrative_area_level_1', |
||
30 | 'country', |
||
31 | 'postal_code' |
||
32 | ]; |
||
33 | |||
34 | /** |
||
35 | * @var array |
||
36 | */ |
||
37 | protected $customOptions = []; |
||
38 | |||
39 | /** |
||
40 | * @var string |
||
41 | */ |
||
42 | protected $customisationsVarName; |
||
43 | |||
44 | /** |
||
45 | * GoogleMapsField constructor. |
||
46 | * @param $name |
||
47 | * @param null $title |
||
48 | * @param string $value |
||
49 | * @param null $maxLength |
||
50 | * @param Form|null $form |
||
51 | */ |
||
52 | public function __construct($name, $title = null, $value = '', $maxLength = null, Form $form = null) |
||
58 | |||
59 | /** |
||
60 | * @param array $properties |
||
61 | * @return \SilverStripe\ORM\FieldType\DBHTMLText |
||
62 | */ |
||
63 | public function field($properties = []) |
||
74 | |||
75 | /** |
||
76 | * @return string |
||
77 | */ |
||
78 | public function getHiddenFields() |
||
86 | |||
87 | /** |
||
88 | * @return array |
||
89 | */ |
||
90 | public function getExtraFields() |
||
94 | |||
95 | /** |
||
96 | * @param array $extraFields |
||
97 | */ |
||
98 | public function setExtraFields($extraFields) |
||
102 | |||
103 | /** |
||
104 | * @param string $field |
||
105 | */ |
||
106 | public function addExtraField($field) |
||
110 | |||
111 | /** |
||
112 | * @return string |
||
113 | */ |
||
114 | public function getCustomOptions() |
||
118 | |||
119 | /** |
||
120 | * @param array $customOptions |
||
121 | */ |
||
122 | public function setCustomOptions($customOptions) |
||
126 | |||
127 | /** |
||
128 | * @return string |
||
129 | */ |
||
130 | public function getCustomisationsVarName() |
||
134 | |||
135 | /** |
||
136 | * @param string $varName |
||
137 | */ |
||
138 | public function setCustomisationsVarName($varName) |
||
142 | } |
||
143 |
Since your code implements the magic getter
_get
, this function will be called for any read access on an undefined variable. You can add the@property
annotation to your class or interface to document the existence of this variable.If the property has read access only, you can use the @property-read annotation instead.
Of course, you may also just have mistyped another name, in which case you should fix the error.
See also the PhpDoc documentation for @property.