You are here

function date_views_filter_handler::init in Date 8

Same name and namespace in other branches
  1. 7.3 date_views/includes/date_views_filter_handler.inc \date_views_filter_handler::init()
  2. 7 date_views/includes/date_views_filter_handler.inc \date_views_filter_handler::init()
  3. 7.2 date_views/includes/date_views_filter_handler.inc \date_views_filter_handler::init()

Overrides date_views_filter_handler_simple::init

File

date_views/includes/date_views_filter_handler.inc, line 10
A flexible, configurable date filter. This filter combines multiple date filters into a single filter where all fields are controlled by the same date and can be combined with either AND or OR.

Class

date_views_filter_handler
@file A flexible, configurable date filter. This filter combines multiple date filters into a single filter where all fields are controlled by the same date and can be combined with either AND or OR.

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']);
}