public function date_views_filter_handler::get_query_fields in Date 7.2
Same name and namespace in other branches
- 8 date_views/includes/date_views_filter_handler.inc \date_views_filter_handler::get_query_fields()
- 7.3 date_views/includes/date_views_filter_handler.inc \date_views_filter_handler::get_query_fields()
- 7 date_views/includes/date_views_filter_handler.inc \date_views_filter_handler::get_query_fields()
@todo Document this.
2 calls to date_views_filter_handler::get_query_fields()
- date_views_filter_handler::date_combine_conditions in date_views/
includes/ date_views_filter_handler.inc - Combines multiple date WHERE expressions into a single WHERE expression.
- date_views_filter_handler::op_empty in date_views/
includes/ date_views_filter_handler.inc - @todo Document this.
File
- date_views/
includes/ date_views_filter_handler.inc, line 238 - A flexible, configurable date filter.
Class
- date_views_filter_handler
- A flexible, configurable date filter.
Code
public function get_query_fields() {
$fields = date_views_fields($this->base_table);
$fields = $fields['name'];
$this->query_fields = array();
foreach ((array) $this->options['date_fields'] as $delta => $name) {
if (array_key_exists($name, $fields) && ($field = $fields[$name])) {
$date_handler = new date_sql_handler($field['sql_type'], date_default_timezone());
$date_handler->granularity = $this->options['granularity'];
$date_handler->db_timezone = date_get_timezone_db($field['tz_handling']);
$date_handler->local_timezone = date_get_timezone($field['tz_handling']);
$this->query_fields[] = array(
'field' => $field,
'date_handler' => $date_handler,
);
}
}
}