You are here

function String::op_shorter in Views (for Drupal 7) 8.3

File

lib/Drupal/views/Plugin/views/filter/String.php, line 326
Definition of Drupal\views\Plugin\views\filter\String.

Class

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

Namespace

Drupal\views\Plugin\views\filter

Code

function op_shorter($field) {
  $placeholder = $this
    ->placeholder();
  $this->query
    ->add_where_expression($this->options['group'], "LENGTH({$field}) < {$placeholder}", array(
    $placeholder => $this->value,
  ));
}