Skip to content

Commit 43a4777

Browse files
committed
DOCS Updating some syntax
1 parent 546271d commit 43a4777

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

README.md

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ use BetterBrief\GoogleMapField;
2424

2525
class Store extends DataObject
2626
{
27-
private static $db = array(
27+
private static $db = [
2828
'Title' => 'Varchar(255)',
2929
'Latitude' => 'Varchar',
3030
'Longitude' => 'Varchar',
31-
);
31+
];
3232

3333
public function getCMSFields() {
3434
$fields = parent::getCMSFiels();
@@ -40,8 +40,7 @@ class Store extends DataObject
4040
));
4141

4242
// 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']);
4544

4645
return $fields;
4746
}
@@ -73,14 +72,14 @@ use BetterBrief\GoogleMapField;
7372
$field = new GoogleMapField(
7473
$dataObject,
7574
'FieldName',
76-
array(
75+
[
7776
'api_key' => 'my-api-key',
7877
'show_search_box' => false,
79-
'map' => array(
78+
'map' => [
8079
'zoom' => 10,
81-
),
80+
],
8281
...
83-
)
82+
]
8483
);
8584
```
8685

@@ -97,11 +96,11 @@ use BetterBrief\GoogleMapField;
9796
$field = new GoogleMapField(
9897
$object,
9998
'Location',
100-
array(
101-
'map' => array(
99+
[
100+
'map' => [
102101
'mapTypeId' => 'SATELLITE',
103-
),
104-
)
102+
],
103+
]
105104
);
106105
```
107106

0 commit comments

Comments
 (0)