public function MysqlDate::opSimple in Views Custom Table 8
Same name and namespace in other branches
- 9.0.x src/Plugin/views/filter/MysqlDate.php \Drupal\view_custom_table\Plugin\views\filter\MysqlDate::opSimple()
Overrides Date::opSimple
File
- src/
Plugin/ views/ filter/ MysqlDate.php, line 61
Class
- MysqlDate
- Filter to handle dates stored as a datetime.
Namespace
Drupal\view_custom_table\Plugin\views\filterCode
public function opSimple($field) {
$value = intval(strtotime($this->value['value'], $this->time
->getRequestTime()));
$value = $this->dateFormatter
->format($value, 'custom', 'Y-m-d');
$this->query
->addWhere($this->options['group'], $field, $value, $this->operator);
}