1 date_views_argument_handler.inc date_views_argument_handler::init(&$view, &$options)

Get granularity and use it to create the formula and a format for the results.

Overrides date_views_argument_handler_simple::init

File

core/modules/date/views/date_views_argument_handler.inc, line 20
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

date_views_argument_handler

Code

function init(&$view, &$options) {
  parent::init($view, $options);

  if (empty($this->view->date_info)) {
    $this->view->date_info = new stdClass();
  }
  if (empty($this->view->date_info->date_fields)) {
    $this->view->date_info->date_fields = array();
  }
  $this->view->date_info->date_fields = array_merge($this->view->date_info->date_fields, $this->options['date_fields']);
}