function private_handler_filter_private::query in Private 7.2
Same name and namespace in other branches
- 8.2 private_handler_filter_private.inc \private_handler_filter_private::query()
- 6 private_handler_filter_private.inc \private_handler_filter_private::query()
- 7 private_handler_filter_private.inc \private_handler_filter_private::query()
Add this filter to the query.
Due to the nature of fapi, the value and the operator have an unintended level of indirection. You will find them in $this->operator and $this->value respectively.
Overrides views_handler_filter_boolean_operator::query
File
- ./
private_handler_filter_private.inc, line 14 - Views handlers for the private module.
Class
- private_handler_filter_private
- @file Views handlers for the private module.
Code
function query() {
$this
->ensure_my_table();
$qualified_name = "{$this->table_alias}.{$this->real_field}";
$this->query
->add_where_expression($this->options['group'], $qualified_name . (empty($this->value) ? " = 0 OR {$qualified_name} IS NULL" : ' = 1'));
}