You are here

protected function Date::opBetween in EntityFieldQuery Views Backend 8

Filters by operator between.

Parameters

object $field: The views field.

Overrides Date::opBetween

3 calls to Date::opBetween()
FieldDate::opBetween in src/Plugin/views/filter/FieldDate.inc
Filters by operator between.
PropertyDate::opBetween in src/Plugin/views/filter/PropertyDate.php
Filters by operator between.
PropertyDate::opSimple in src/Plugin/views/filter/PropertyDate.php
2 methods override Date::opBetween()
FieldDate::opBetween in src/Plugin/views/filter/FieldDate.inc
Filters by operator between.
PropertyDate::opBetween in src/Plugin/views/filter/PropertyDate.php
Filters by operator between.

File

src/Plugin/views/filter/Date.php, line 44
Contains \Drupal\efq_views\Plugin\views\filter\Date.

Class

Date
Filter handler for date properties.

Namespace

Drupal\efq_views\Plugin\views\filter

Code

protected function opBetween($field) {
  if ($this->operator == 'between') {
    $a = strtotime($this->value['min']);
    $b = strtotime($this->value['max']);
  }
  else {
    $a = strtotime($this->value['max']);
    $b = strtotime($this->value['min']);
  }
  return array(
    $a,
    $b,
  );
}