1 date_views_argument_handler.inc | date_views_argument_handler::get_query_fields() |
Collect information about our fields we will need to create the right query.
File
- core/
modules/ date/ views/ date_views_argument_handler.inc, line 184 - Date API views argument handler. This argument combines multiple date arguments into a single argument where all fields are controlled by the same date and can be combined with either AND or OR.
Class
Code
function get_query_fields() {
$fields = date_views_fields($this->base_table);
$fields = $fields['name'];
$this->query_fields = array();
foreach ($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']);
date_views_set_timezone($date_handler, $this, $field);
$this->query_fields[] = array('field' => $field, 'date_handler' => $date_handler);
}
}
}