class views_plugin_argument_default_bboxquery in Views GeoJSON 6
Same name and namespace in other branches
- 7 views/views_plugin_argument_default_bboxquery.inc \views_plugin_argument_default_bboxquery
The BBOX query string argument default handler.
Hierarchy
- class \views_plugin_argument_default_bboxquery extends \views_plugin_argument_default
Expanded class hierarchy of views_plugin_argument_default_bboxquery
1 string reference to 'views_plugin_argument_default_bboxquery'
- views_geojson_views_plugins in views/
views_geojson.views.inc - Implements hook_views_plugins().
File
- views/
views_plugin_argument_default_bboxquery.inc, line 10 - Contains the BBOX query string argument default plugin.
View source
class views_plugin_argument_default_bboxquery extends views_plugin_argument_default {
function option_definition() {
$options = parent::option_definition();
$options['argument'] = array(
'default' => '',
);
return $options;
}
function options_form(&$form, &$form_state) {
parent::options_form($form, $form_state);
$form['info'] = array(
'#markup' => '<p class="description">Attempt to pull bounding box info
directly from the query string, bypassing Drupal\'s normal argument
handling. If the argument does not exist, all values will be shown.</p>',
);
$form['arg_id'] = array(
'#type' => 'textfield',
'#title' => t('Query argument ID'),
'#size' => 60,
'#maxlength' => 64,
'#default_value' => $this->options['arg_id'] ? $this->options['arg_id'] : t('BBOX'),
'#description' => t('The ID of the query argument.<br />For OpenLayers use <em>BBOX</em>, (as in "<em>?BBOX=left,bottom,right,top</em>".)'),
);
}
/**
* Return the default argument.
*/
function get_argument() {
if (isset($_GET[$this->options['arg_id']])) {
return $_GET[$this->options['arg_id']];
}
else {
return TRUE;
// Return all values if arg not present
}
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
views_plugin_argument_default_bboxquery:: |
function | Return the default argument. | ||
views_plugin_argument_default_bboxquery:: |
function | |||
views_plugin_argument_default_bboxquery:: |
function |