You are here

public function StringFilter::operator in Drupal 10

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

Get the query operator.

Return value

string Returns LIKE or NOT LIKE or the database specific equivalent based on the query's operator.

1 call to StringFilter::operator()
StringFilter::opEqual in core/modules/views/src/Plugin/views/filter/StringFilter.php

File

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

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
    ->getConditionOperator($this->operator == '=' ? 'LIKE' : 'NOT LIKE');
}