public function views_plugin_argument_default_bboxquery::get_argument in Views GeoJSON 7
Same name and namespace in other branches
- 6 views/views_plugin_argument_default_bboxquery.inc \views_plugin_argument_default_bboxquery::get_argument()
Return the default argument.
Overrides views_plugin_argument_default::get_argument
File
- views/
views_plugin_argument_default_bboxquery.inc, line 18 - Contains the BBOX query string argument default plugin.
Class
- views_plugin_argument_default_bboxquery
- The BBOX query string argument default handler.
Code
public function get_argument() {
$query = drupal_get_query_parameters();
if (isset($query[$this->options['arg_id']])) {
// Just set the argument here. We'll validate and sanitize the input in
// views_geojson_bbox_argument::query().
return $query[$this->options['arg_id']];
}
if ($this->argument->options['empty_result']) {
// Return no values if arg not present and empty result option is set.
$this->view->built = TRUE;
$this->view->executed = TRUE;
return FALSE;
}
// Return all values if arg not present.
return TRUE;
}