You are here

protected function ProximitySort::defineOptions in Geolocation Field 8

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 SortPluginBase::defineOptions

File

src/Plugin/views/sort/ProximitySort.php, line 21

Class

ProximitySort
Sort handler for geolocaiton field.

Namespace

Drupal\geolocation\Plugin\views\sort

Code

protected function defineOptions() {

  // Add source, lat, lng and filter.
  return [
    'proximity_field' => [
      'default' => '',
    ],
  ] + parent::defineOptions();
}