You are here

public function GeofieldRectBoundaryFilter::acceptExposedInput in Geofield 8

Determines if the input from a filter should change the generated query.

Parameters

array $input: The exposed data for this view.

Return value

bool TRUE if the input for this filter should be included in the view query. FALSE otherwise.

Overrides FilterPluginBase::acceptExposedInput

File

src/Plugin/views/filter/GeofieldRectBoundaryFilter.php, line 42

Class

GeofieldRectBoundaryFilter
Filter handler for search keywords.

Namespace

Drupal\geofield\Plugin\views\filter

Code

public function acceptExposedInput($input) {
  if (!empty($this->value['group']['lat_north_east']) && !empty($this->value['group']['lng_north_east']) && !empty($this->value['group']['lat_south_west']) && !empty($this->value['group']['lng_south_west'])) {
    return TRUE;
  }
  $return_value = parent::acceptExposedInput($input);
  if (empty($this->value)) {
    $this->value = [];
  }
  return $return_value;
}