public function date_views_argument_handler::get_query_fields in Date 7.3
Same name and namespace in other branches
- 8 date_views/includes/date_views_argument_handler.inc \date_views_argument_handler::get_query_fields()
- 7 date_views/includes/date_views_argument_handler.inc \date_views_argument_handler::get_query_fields()
- 7.2 date_views/includes/date_views_argument_handler.inc \date_views_argument_handler::get_query_fields()
1 call to date_views_argument_handler::get_query_fields()
- date_views_argument_handler::query in date_views/
includes/ date_views_argument_handler.inc - Build the query based upon the formula
File
- date_views/
includes/ date_views_argument_handler.inc, line 194 - Date API views argument handler.
Class
- date_views_argument_handler
- Date API argument handler.
Code
public 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,
);
}
}
}