function Date::getDateField

Same name in this branch
  1. 10 core/modules/datetime/src/Plugin/views/sort/Date.php \Drupal\datetime\Plugin\views\sort\Date::getDateField()
Same name in other branches
  1. 9 core/modules/datetime/src/Plugin/views/sort/Date.php \Drupal\datetime\Plugin\views\sort\Date::getDateField()
  2. 9 core/modules/datetime/src/Plugin/views/argument/Date.php \Drupal\datetime\Plugin\views\argument\Date::getDateField()
  3. 8.9.x core/modules/datetime/src/Plugin/views/sort/Date.php \Drupal\datetime\Plugin\views\sort\Date::getDateField()
  4. 8.9.x core/modules/datetime/src/Plugin/views/argument/Date.php \Drupal\datetime\Plugin\views\argument\Date::getDateField()
  5. 11.x core/modules/datetime/src/Plugin/views/sort/Date.php \Drupal\datetime\Plugin\views\sort\Date::getDateField()
  6. 11.x core/modules/datetime/src/Plugin/views/argument/Date.php \Drupal\datetime\Plugin\views\argument\Date::getDateField()

Overrides HandlerBase::getDateField

1 call to Date::getDateField()
Date::getDateFormat in core/modules/datetime/src/Plugin/views/argument/Date.php
Creates cross-database SQL date formatting.

File

core/modules/datetime/src/Plugin/views/argument/Date.php, line 69

Class

Date
Abstract argument handler for dates.

Namespace

Drupal\datetime\Plugin\views\argument

Code

public function getDateField() {
    // Use string date storage/formatting since datetime fields are stored as
    // strings rather than UNIX timestamps.
    return $this->query
        ->getDateField("{$this->tableAlias}.{$this->realField}", TRUE, $this->calculateOffset);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.