You are here

public function IndexTidDepth::query in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/taxonomy/src/Plugin/views/argument/IndexTidDepth.php \Drupal\taxonomy\Plugin\views\argument\IndexTidDepth::query()
  2. 10 core/modules/taxonomy/src/Plugin/views/argument/IndexTidDepth.php \Drupal\taxonomy\Plugin\views\argument\IndexTidDepth::query()

Set up the query for this argument.

The argument sent may be found at $this->argument.

Overrides ArgumentPluginBase::query

File

core/modules/taxonomy/src/Plugin/views/argument/IndexTidDepth.php, line 97

Class

IndexTidDepth
Argument handler for taxonomy terms with depth.

Namespace

Drupal\taxonomy\Plugin\views\argument

Code

public function query($group_by = FALSE) {
  $this
    ->ensureMyTable();
  if (!empty($this->options['break_phrase'])) {
    $break = static::breakString($this->argument);
    if ($break->value === [
      -1,
    ]) {
      return FALSE;
    }
    $tids = $break->value;
  }
  else {
    $tids = $this->argument;
  }
  $this
    ->addSubQueryJoin($tids);
}