protected function Fraction::opRegex in Fraction 8
Same name and namespace in other branches
- 2.x src/Plugin/views/filter/Fraction.php \Drupal\fraction\Plugin\views\filter\Fraction::opRegex()
Filters by a regular expression.
Parameters
string $field: The expression pointing to the queries field, for example "foo.bar".
Overrides NumericFilter::opRegex
File
- src/
Plugin/ views/ filter/ Fraction.php, line 67
Class
- Fraction
- Filter handler for Fraction fields.
Namespace
Drupal\fraction\Plugin\views\filterCode
protected function opRegex($field) {
$expression = $field . ' RLIKE :value';
$this->query
->addWhereExpression($this->options['group'], $expression, [
':value' => $this->value['value'],
]);
}