public function range_handler_argument_numeric_range::query in Range 7
Set up the query for this argument.
The argument sent may be found at $this->argument.
Parameters
bool $group_by: Whether the query uses a group-by.
Overrides views_handler_argument::query
File
- views/
range_handler_argument_numeric_range.inc, line 53 - Contains argument handler for numeric range arguments with views.
Class
- range_handler_argument_numeric_range
- Argument handler for limiting a view to entities which lies within a range.
Code
public function query($group_by = FALSE) {
list($field_from, $field_to) = $this
->get_range_subfields();
$operators = array(
'<',
'>',
'<=',
'>=',
);
$operator = $this->options['operator'];
$inlude_endpoints = !($this->options['include_endpoints'] xor $operator === 'within');
list($op_left, $op_right) = array_slice($operators, $inlude_endpoints ? 2 : 0, 2);
$this
->op_within_query($operator, $field_from, $field_to, $op_left, $op_right);
}