You are here

public function GoogleAnalyticsBase::query in Google Analytics Reports 8.3

Add this filter to the query.

Due to the nature of fapi, the value and the operator have an unintended level of indirection. You will find them in $this->operator and $this->value respectively.

Overrides FilterPluginBase::query

File

src/Plugin/views/filter/GoogleAnalyticsBase.php, line 87

Class

GoogleAnalyticsBase
Provides base filter functionality for Google Analytics fields.

Namespace

Drupal\google_analytics_reports\Plugin\views\filter

Code

public function query() {
  if ($this->isCustom) {
    $this->realField = google_analytics_reports_custom_to_variable_field($this->realField, $this->options['custom_field_number']);
  }
  $info = $this
    ->operators();
  if (!empty($info[$this->operator]['method'])) {
    $this
      ->{$info[$this->operator]['method']}($this->realField);
  }
}