1 views_handler_argument_many_to_one.inc | views_handler_argument_many_to_one::query($group_by = FALSE) |
Set up the query for this argument.
The argument sent may be found at $this->argument.
Overrides views_handler_argument::query
File
- core/
modules/ views/ handlers/ views_handler_argument_many_to_one.inc, line 91 - Definition of views_handler_argument_many_to_one.
Class
- views_handler_argument_many_to_one
- An argument handler for use in fields that have a many to one relationship with the table(s) to the left. This adds a bunch of options that are reasonably common with this type of relationship. Definition terms:
Code
function query($group_by = FALSE) {
$empty = FALSE;
if (isset($this->definition['zero is null']) && $this->definition['zero is null']) {
if (empty($this->argument)) {
$empty = TRUE;
}
}
else {
if (!isset($this->argument)) {
$empty = TRUE;
}
}
if ($empty) {
parent::ensure_my_table();
$this->query->add_where(0, "$this->table_alias.$this->real_field", NULL, 'IS NULL');
return;
}
if (!empty($this->options['break_phrase'])) {
views_break_phrase($this->argument, $this);
}
else {
$this->value = array($this->argument);
$this->operator = 'or';
}
$this->helper->add_filter();
}