public function IndexTid::titleQuery

Override for specific title lookups.

Overrides ManyToOne::titleQuery

File

drupal/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/views/argument/IndexTid.php, line 46
Definition of Drupal\taxonomy\Plugin\views\argument\IndexTid.

Class

IndexTid
Allow taxonomy term ID(s) as argument.

Namespace

Drupal\taxonomy\Plugin\views\argument

Code

public function titleQuery() {
  $titles = array();
  $result = db_select('taxonomy_term_data', 'td')
    ->fields('td', array(
    'name',
  ))
    ->condition('td.tid', $this->value)
    ->execute();
  foreach ($result as $term) {
    $titles[] = check_plain($term->name);
  }
  return $titles;
}