You are here

protected function WebformSubmissionWebformStatus::opSimple in Webform Views Integration 8.5

Overrides InOperator::opSimple

File

src/Plugin/views/filter/WebformSubmissionWebformStatus.php, line 84

Class

WebformSubmissionWebformStatus
Filter for webform status of a webform submission.

Namespace

Drupal\webform_views\Plugin\views\filter

Code

protected function opSimple() {
  $webform_ids = $this
    ->getApplicableWebformIds();
  if (empty($webform_ids)) {

    // Since no webforms were matched. Put a condition that yields FALSE.
    $this->query
      ->addWhereExpression($this->options['group'], '1 = 0');
  }
  else {
    $this
      ->ensureMyTable();
    $this->query
      ->addWhere($this->options['group'], "{$this->tableAlias}.{$this->realField}", $webform_ids, 'IN');
  }
}