Skip to content

Commit 8e3ea75

Browse files
author
cpenny
committed
Add extension point to requireDependencies to update gmaps params.
1 parent 7711a1c commit 8e3ea75

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/GoogleMapField.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class GoogleMapField extends FormField {
3939
* @var FormField
4040
*/
4141
protected $zoomField;
42-
42+
4343
/**
4444
* @var FormField
4545
*/
@@ -178,6 +178,7 @@ protected function requireDependencies() {
178178
if($key = $this->getOption('api_key')) {
179179
$gmapsParams['key'] = $key;
180180
}
181+
$this->extend('updateGoogleMapsParams', $gmapsParams);
181182
Requirements::css('betterbrief/silverstripe-googlemapfield: client/css/GoogleMapField.css');
182183
Requirements::javascript('betterbrief/silverstripe-googlemapfield: client/js/GoogleMapField.js');
183184
Requirements::javascript('//maps.googleapis.com/maps/api/js?' . http_build_query($gmapsParams));

0 commit comments

Comments
 (0)