String.php in EntityFieldQuery Views Backend 8
File
src/Plugin/views/filter/String.php
View source
<?php
namespace Drupal\efq_views\Plugin\views\filter;
use Drupal\views\Plugin\views\filter\String as ViewsString;
class String extends ViewsString {
function operators() {
$operators = array(
'=' => array(
'title' => t('Is equal to'),
'short' => t('='),
'method' => 'op_simple',
'values' => 1,
),
'<>' => array(
'title' => t('Is not equal to'),
'short' => t('!='),
'method' => 'op_simple',
'values' => 1,
),
'CONTAINS' => array(
'title' => t('Contains'),
'short' => t('contains'),
'method' => 'op_simple',
'values' => 1,
),
'STARTS_WITH' => array(
'title' => t('Starts with'),
'short' => t('begins'),
'method' => 'op_simple',
'values' => 1,
),
);
return $operators;
}
function query() {
$info = $this
->operators();
if (!empty($info[$this->operator]['method'])) {
$this
->{$info[$this->operator]['method']}($this->real_field);
}
}
}
Classes
Name |
Description |
String |
Filter handler for string. |