You are here

function IndexTid::title_query in Views (for Drupal 7) 8.3

Override for specific title lookups.

Overrides ManyToOne::title_query

File

lib/Views/taxonomy/Plugin/views/argument/IndexTid.php, line 49
Definition of Views\taxonomy\Plugin\views\argument\IndexTid.

Class

IndexTid
Allow taxonomy term ID(s) as argument.

Namespace

Views\taxonomy\Plugin\views\argument

Code

function title_query() {
  $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;
}