You are here

function matrix_handler_filter::op_not_starts in Matrix field 8.2

Same name in this branch
  1. 8.2 views/matrix_handler_filter.inc \matrix_handler_filter::op_not_starts()
  2. 8.2 src/matrix_handler_filter.php \Drupal\matrix\matrix_handler_filter::op_not_starts()

File

src/matrix_handler_filter.php, line 262

Class

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

Namespace

Drupal\matrix

Code

function op_not_starts($field) {
  $placeholder = $this
    ->placeholder();
  list($row, $col, $value) = explode('_____', $this->value);
  $this->query
    ->add_where($this->options['group'], $field . 'row', $row, '=');
  $this->query
    ->add_where($this->options['group'], $field . 'col', $col, '=');
  $this->query
    ->add_where_expression($this->options['group'], $field . "value NOT LIKE {$placeholder}", array(
    $placeholder => db_like($value) . '%',
  ));
}