1.20.x views_handler_argument_dates_various.inc views_handler_argument_node_created_year::init(&$view, &$options)

init the handler with necessary data.

Parameters

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

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

Overrides views_handler_argument_date::init

File

modules/node/views/views_handler_argument_dates_various.inc, line 58
Handlers for various date arguments.

Class

views_handler_argument_node_created_year
Argument handler for a year (CCYY)

Code

function init(&$view, &$options) {
  parent::init($view, $options);
  $db_connection = $this->query->database_connection();
  $field = $db_connection->dateFieldSql("***table***.$this->real_field");
  $this->formula = $db_connection->dateExtractSql($field, 'YEAR');
}