@@ -24,11 +24,11 @@ use BetterBrief\GoogleMapField;
24
24
25
25
class Store extends DataObject
26
26
{
27
- private static $db = array(
27
+ private static $db = [
28
28
'Title' => 'Varchar(255)',
29
29
'Latitude' => 'Varchar',
30
30
'Longitude' => 'Varchar',
31
- ) ;
31
+ ] ;
32
32
33
33
public function getCMSFields() {
34
34
$fields = parent::getCMSFiels();
@@ -40,8 +40,7 @@ class Store extends DataObject
40
40
));
41
41
42
42
// remove the lat / lng fields from the CMS
43
- $fields->removeFieldFromTab('Root.Main', 'Latitude');
44
- $fields->removeFieldFromTab('Root.Main', 'Longitude');
43
+ $fields->removeFieldsFromTab('Root.Main', ['Latitude', 'Longitude']);
45
44
46
45
return $fields;
47
46
}
@@ -73,14 +72,14 @@ use BetterBrief\GoogleMapField;
73
72
$field = new GoogleMapField(
74
73
$dataObject,
75
74
'FieldName',
76
- array(
75
+ [
77
76
'api_key' => 'my-api-key',
78
77
'show_search_box' => false,
79
- 'map' => array(
78
+ 'map' => [
80
79
'zoom' => 10,
81
- ) ,
80
+ ] ,
82
81
...
83
- )
82
+ ]
84
83
);
85
84
` ` `
86
85
@@ -97,11 +96,11 @@ use BetterBrief\GoogleMapField;
97
96
$field = new GoogleMapField(
98
97
$object,
99
98
'Location',
100
- array(
101
- 'map' => array(
99
+ [
100
+ 'map' => [
102
101
'mapTypeId' => 'SATELLITE',
103
- ) ,
104
- )
102
+ ] ,
103
+ ]
105
104
);
106
105
` ` `
107
106
0 commit comments