You are here

protected function TaxonomyEntityIndexDepth::getOperatorAndIds in Taxonomy Entity Index 8

Fetches the operator and the list of IDs.

Return value

array The first item is the operator and second is the list of IDs.

1 call to TaxonomyEntityIndexDepth::getOperatorAndIds()
TaxonomyEntityIndexDepth::query in src/Plugin/views/argument/TaxonomyEntityIndexDepth.php
Set up the query for this argument.

File

src/Plugin/views/argument/TaxonomyEntityIndexDepth.php, line 129

Class

TaxonomyEntityIndexDepth
Abstract argument handler for entity taxonomy terms with depth.

Namespace

Drupal\taxonomy_entity_index\Plugin\views\argument

Code

protected function getOperatorAndIds() {
  $results = [];
  if (!empty($this->options['break_phrase'])) {
    $break = static::breakString($this->argument);
    $results[] = count($break->value) > 1 ? 'IN' : '=';
    $results[] = $break->value;
  }
  else {
    $results[] = "=";
    $results[] = $this->argument;
  }
  return $results;
}