You are here

public function BBoxQuery::getArgument in Views GeoJSON 8

Return the default argument.

Overrides QueryParameter::getArgument

File

src/Plugin/views/argument_default/BBoxQuery.php, line 46

Class

BBoxQuery
The BBOX query string argument default handler.

Namespace

Drupal\views_geojson\Plugin\views\argument_default

Code

public function getArgument() {
  $current_request = $this->view
    ->getRequest();
  if ($current_request->query
    ->has($this->options['arg_id'])) {
    return $current_request->query
      ->get($this->options['arg_id']);
  }

  // TODO: What should be returned if arg not present, and empty result option
  // is set or not ? Otherwise, use the fixed fallback value.
  return $this->options['fallback'];
}