You are here

protected function StringFilter::opRegex in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/views/src/Plugin/views/filter/StringFilter.php \Drupal\views\Plugin\views\filter\StringFilter::opRegex()
  2. 10 core/modules/views/src/Plugin/views/filter/StringFilter.php \Drupal\views\Plugin\views\filter\StringFilter::opRegex()

Filters by a regular expression.

Parameters

string $field: The expression pointing to the queries field, for example "foo.bar".

1 method overrides StringFilter::opRegex()
Combine::opRegex in core/modules/views/src/Plugin/views/filter/Combine.php
Filters by a regular expression.

File

core/modules/views/src/Plugin/views/filter/StringFilter.php, line 404

Class

StringFilter
Basic textfield filter to handle string filtering commands including equality, like, not like, etc.

Namespace

Drupal\views\Plugin\views\filter

Code

protected function opRegex($field) {
  $this->query
    ->addWhere($this->options['group'], $field, $this->value, 'REGEXP');
}