You are here

protected function ProximityField::defineOptions in Geolocation Field 8.3

Same name and namespace in other branches
  1. 8 src/Plugin/views/field/ProximityField.php \Drupal\geolocation\Plugin\views\field\ProximityField::defineOptions()
  2. 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 64

Class

ProximityField
Field handler for geolocation field.

Namespace

Drupal\geolocation\Plugin\views\field

Code

protected function defineOptions() {
  $options = parent::defineOptions();
  $options['center'] = [
    'default' => [],
  ];
  $options['display_unit'] = [
    'default' => 'km',
  ];
  return $options;
}