public function date_views_filter_handler::op_empty in Date 7.2
Same name and namespace in other branches
- 7.3 date_views/includes/date_views_filter_handler.inc \date_views_filter_handler::op_empty()
@todo Document this.
Overrides views_handler_filter_numeric::op_empty
File
- date_views/
includes/ date_views_filter_handler.inc, line 67 - A flexible, configurable date filter.
Class
- date_views_filter_handler
- A flexible, configurable date filter.
Code
public function op_empty($field) {
$this
->get_query_fields();
if (empty($this->query_fields)) {
return;
}
// Add each condition to the custom filter group.
foreach ((array) $this->query_fields as $query_field) {
$field = $query_field['field'];
$this->date_handler = $query_field['date_handler'];
// Respect relationships when determining the table alias.
if ($field['table_name'] != $this->table || !empty($this->relationship)) {
$this->related_table_alias = $this->query
->ensure_table($field['table_name'], $this->relationship);
}
else {
$this->related_table_alias = NULL;
}
$table_alias = !empty($this->related_table_alias) ? $this->related_table_alias : $field['table_name'];
$field_name = $table_alias . '.' . $field['field_name'];
parent::op_empty($field_name);
}
}