public function RawSQLArgument::query in Views Raw SQL 8
Create the query.
Overrides ArgumentPluginBase::query
File
- src/
Plugin/ views/ argument/ RawSQLArgument.php, line 74
Class
- RawSQLArgument
- Argument handler to accept a numeric range.
Namespace
Drupal\views_raw_sql\Plugin\views\argumentCode
public function query($group_by = FALSE) {
$this
->ensureMyTable();
$raw_sql = $this->options['where_raw_sql'];
$argument = $this->argument;
$raw_sql = str_replace('%argument%', $argument, $raw_sql);
$this->query
->addWhereExpression($this->options['group'], $raw_sql);
}