You are here

public function Status::query in Support Ticketing System 8

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

modules/support_ticket/src/Plugin/views/filter/Status.php, line 28
Contains \Drupal\support_ticket\Plugin\views\filter\Status.

Class

Status
Filter by published status.

Namespace

Drupal\support_ticket\Plugin\views\filter

Code

public function query() {
  $table = $this
    ->ensureMyTable();
  $this->query
    ->addWhereExpression($this->options['group'], "{$table}.status = 1 OR ({$table}.uid = ***CURRENT_USER*** AND ***CURRENT_USER*** <> 0 AND ***VIEW_OWN_UNPUBLISHED_SUPPORT_TICKETS*** = 1) OR ***ADMINISTER_SUPPORT_TICKETS*** = 1");
}