You are here

function views_date_format_sql_handler_date_field::set_items in Views Date Format SQL 7.3

Return an array of items for the field.

Overrides views_handler_field_field::set_items

File

includes/views_date_format_sql_handler_date_field.inc, line 51
This file contains the class to override views_handler_field_date.

Class

views_date_format_sql_handler_date_field
Allows to removes the date formatting from render() and put it in query().

Code

function set_items($values, $row_id) {
  if ($this->options['format_date_sql'] == TRUE && $this->view->query->has_aggregate) {

    // If we get the formatted value from storage, then it should be output as
    // plain.
    $this->options['type'] = 'date_plain';
  }
  return parent::set_items($values, $row_id);
}