1 views_handler_argument_term_node_tid.inc views_handler_argument_term_node_tid::title_query()

Override for specific title lookups.

Overrides views_handler_argument_many_to_one::title_query

File

core/modules/taxonomy/views/views_handler_argument_term_node_tid.inc, line 38
Definition of views_handler_argument_term_node_tid.

Class

views_handler_argument_term_node_tid
Allow taxonomy term ID(s) as argument.

Code

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