public function GooglePlacesAPI::formAttachGeocoder in Geolocation Field 8.2
Same name and namespace in other branches
- 8.3 modules/geolocation_google_maps/modules/geolocation_google_places_api/src/Plugin/geolocation/Geocoder/GooglePlacesAPI.php \Drupal\geolocation_google_places_api\Plugin\geolocation\Geocoder\GooglePlacesAPI::formAttachGeocoder()
- 8 modules/geolocation_google_places_api/src/Plugin/geolocation/Geocoder/GooglePlacesAPI.php \Drupal\geolocation_google_places_api\Plugin\geolocation\Geocoder\GooglePlacesAPI::formAttachGeocoder()
Attach geocoding logic to input element.
Parameters
array $render_array: Form containing the input element.
string $element_name: Name of the input element.
Return value
array|null Updated form element or NULL.
Overrides GoogleGeocoderBase::formAttachGeocoder
File
- modules/
geolocation_google_maps/ modules/ geolocation_google_places_api/ src/ Plugin/ geolocation/ Geocoder/ GooglePlacesAPI.php, line 29
Class
- GooglePlacesAPI
- Provides the Google Places API.
Namespace
Drupal\geolocation_google_places_api\Plugin\geolocation\GeocoderCode
public function formAttachGeocoder(array &$render_array, $element_name) {
parent::formAttachGeocoder($render_array, $element_name);
$render_array['#attached'] = BubbleableMetadata::mergeAttachments($render_array['#attached'], [
'library' => [
'geolocation_google_places_api/geolocation_google_places_api.geocoder.googleplacesapi',
],
]);
}