protected function ProximityField::defineOptions in Geolocation Field 8
Same name and namespace in other branches
- 8.3 src/Plugin/views/field/ProximityField.php \Drupal\geolocation\Plugin\views\field\ProximityField::defineOptions()
- 8.2 src/Plugin/views/field/ProximityField.php \Drupal\geolocation\Plugin\views\field\ProximityField::defineOptions()
Information about options for all kinds of purposes will be held here.
'option_name' => array(
- 'default' => default value,
- 'contains' => (optional) array of items this contains, with its own
defaults, etc. If contains is set, the default will be ignored and
assumed to be array().
),
Return value
array Returns the options of this handler/plugin.
Overrides NumericField::defineOptions
File
- src/
Plugin/ views/ field/ ProximityField.php, line 65
Class
- ProximityField
- Field handler for geolocaiton field.
Namespace
Drupal\geolocation\Plugin\views\fieldCode
protected function defineOptions() {
// Add source, lat, lng and filter.
return [
'proximity_source' => [
'default' => 'direct_input',
],
'proximity_lat' => [
'default' => '',
],
'proximity_lng' => [
'default' => '',
],
'proximity_units' => [
'default' => 'km',
],
'proximity_filter' => [
'default' => '',
],
'proximity_argument' => [
'default' => '',
],
'entity_id_argument' => [
'default' => '',
],
'boundary_filter' => [
'default' => '',
],
'proximity_geocoder' => [
'default' => FALSE,
],
'proximity_geocoder_plugin_settings' => [
'default' => [
'plugin_id' => '',
'settings' => [],
],
],
] + parent::defineOptions();
}