You are here

public function StringFilter::operator 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::operator()
  2. 10 core/modules/views/src/Plugin/views/filter/StringFilter.php \Drupal\views\Plugin\views\filter\StringFilter::operator()
2 calls to StringFilter::operator()
Combine::opEqual in core/modules/views/src/Plugin/views/filter/Combine.php
By default things like opEqual uses add_where, that doesn't support complex expressions, so override opEqual (and all operators below).
StringFilter::opEqual in core/modules/views/src/Plugin/views/filter/StringFilter.php

File

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

Class

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

Namespace

Drupal\views\Plugin\views\filter

Code

public function operator() {
  return $this->operator == '=' ? 'LIKE' : 'NOT LIKE';
}