public function contextual_range_filter_handler_argument_string_range::query in Views Contextual Range Filter 7
Build the query.
Overrides views_handler_argument_string::query
File
- views/
contextual_range_filter_handler_argument_string_range.inc, line 48 - Definition of contextual_range_filter_handler_argument_string_range.
Class
- contextual_range_filter_handler_argument_string_range
- Argument handler to implement string range arguments.
Code
public function query($group_by = FALSE) {
$argument = $this->argument;
if (!empty($this->options['transform_dash'])) {
$argument = strtr($argument, '-', ' ');
}
if (!empty($this->options['break_phrase'])) {
views_break_phrase_string($argument, $this);
}
else {
$this->value = array(
$argument,
);
}
$this
->ensure_my_table();
if (!empty($this->definition['many to one'])) {
if (!empty($this->options['glossary'])) {
$this->helper->formula = TRUE;
}
$this->helper
->ensure_my_table();
$this->helper
->add_filter();
return;
}
if (empty($this->options['glossary'])) {
$field = "{$this->table_alias}.{$this->real_field}";
}
else {
$field = $this
->get_formula();
}
contextual_range_filter_build_range_query($this, $field);
}