You are here

public function date_views_argument_handler::init in Date 7.2

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

Init the handler with necessary data.

Parameters

view $view: The $view object this handler is attached to.

array $options: The item from the database; the actual contents of this will vary based upon the type of handler.

Overrides date_views_argument_handler_simple::init

File

date_views/includes/date_views_argument_handler.inc, line 20
Date API views argument handler.

Class

date_views_argument_handler
Date API argument handler.

Code

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