You are here

function SearchApiViewsHandlerArgumentLocationGeofilt::query in Search API Location 7.2

Set up the query for this argument.

The argument sent may be found at $this->argument.

Overrides SearchApiViewsHandlerArgument::query

File

search_api_location_views/handler_argument_location.inc, line 117
Provides the views argument handler for location fields.

Class

SearchApiViewsHandlerArgumentLocationGeofilt
Handler class for views location geofilt.

Code

function query($group_by = FALSE) {
  if ($geofilt = $this
    ->_parse_point($this->argument)) {

    // add radius from options
    $geofilt['radius'] = $this->options['radius'];
    $location_options = (array) $this->query
      ->getOption('search_api_location');
    $this
      ->_add_field_options($location_options, $geofilt, $this->real_field);
    $this->query
      ->setOption('search_api_location', $location_options);
  }
}