FieldString.php in EntityFieldQuery Views Backend 8
File
src/Plugin/views/filter/FieldString.php
View source
<?php
namespace Drupal\efq_views\Plugin\views\filter;
use Drupal\Core\Form\FormStateInterface;
class FieldString extends String {
function defineOptions() {
$options = parent::defineOptions();
$options['delta'] = array(
'default' => NULL,
);
return $options;
}
function buildOptionsForm(&$form, FormStateInterface $form_state) {
parent::buildOptionsForm($form, $form_state);
$form['delta'] = array(
'#type' => 'textfield',
'#title' => t('Delta'),
'#default_value' => $this->options['delta'],
'#description' => t('Numeric delta group identifier. If provided, only values attached to the same delta are matched. Leave empty to match all values.'),
);
}
function opSimple($column) {
$delta = is_numeric($this->options['delta']) ? $this->options['delta'] : NULL;
$this->query->query
->fieldCondition($this->definition['field_name'], $column, $this->value, $this->operator, $delta);
}
}