public function Range::query in Range 8
Same name in this branch
- 8 src/Plugin/views/filter/Range.php \Drupal\range\Plugin\views\filter\Range::query()
- 8 src/Plugin/views/argument/Range.php \Drupal\range\Plugin\views\argument\Range::query()
Add this filter to the query.
Due to the nature of fapi, the value and the operator have an unintended level of indirection. You will find them in $this->operator and $this->value respectively.
Overrides FilterPluginBase::query
File
- src/
Plugin/ views/ filter/ Range.php, line 79
Class
- Range
- Range views filter.
Namespace
Drupal\range\Plugin\views\filterCode
public function query() {
$this
->ensureMyTable();
$field_from = "{$this->tableAlias}.{$this->definition['additional fields']['from']}";
$field_to = "{$this->tableAlias}.{$this->definition['additional fields']['to']}";
$operators = $this
->operators();
if (!empty($operators[$this->operator]['method'])) {
$this
->{$operators[$this->operator]['method']}($field_from, $field_to);
}
}