function geolocation_address_get_widget_settings in Geolocation Field 8.3
Returns geolocation_address third party settings of a widget.
Parameters
\Drupal\Core\Field\WidgetInterface $widget: The widget.
Return value
array The widget settings including defaults.
3 calls to geolocation_address_get_widget_settings()
- geolocation_address_field_widget_settings_summary_alter in modules/
geolocation_address/ geolocation_address.module - Implements hook_field_widget_settings_summary_alter().
- geolocation_address_field_widget_third_party_settings_form in modules/
geolocation_address/ geolocation_address.module - Implements hook_field_widget_third_party_settings_form().
- geolocation_address_geolocation_field_map_widget_alter in modules/
geolocation_address/ geolocation_address.module - Implements hook_geolocation_field_map_widget_alter().
File
- modules/
geolocation_address/ geolocation_address.module, line 356 - Provide address integration where due.
Code
function geolocation_address_get_widget_settings(WidgetInterface $widget) {
$settings = $widget
->getThirdPartySettings('geolocation_address');
// Backwards compatibility if the third party settings have the
// geocoder_settings key but not settings.
if (isset($settings['geocoder_settings']) && !isset($settings['settings'])) {
$settings['settings'] = $settings['geocoder_settings'];
unset($settings['geocoder_settings']);
}
return $settings + [
'enable' => FALSE,
'address_field' => NULL,
'geocoder' => NULL,
'settings' => [],
'sync_mode' => 'auto',
'direction' => 'duplex',
'button_position' => NULL,
'ignore' => [],
];
}