You are here

class apachesolr_views_handler_argument_tid in Apache Solr Views 6

Hierarchy

Expanded class hierarchy of apachesolr_views_handler_argument_tid

1 string reference to 'apachesolr_views_handler_argument_tid'
apachesolr_views_views_data in ./apachesolr_views.views.inc
Implementation of hook_views_data().

File

handlers/apachesolr_views_handler_argument_tid.inc, line 3

View source
class apachesolr_views_handler_argument_tid extends apachesolr_views_handler_argument {
  function title() {
    if (!empty($this->options['break_phrase'])) {
      $this->value = explode(',', $this->argument);
    }
    else {
      $this->value = array(
        $this->argument,
      );
    }
    $term_names = array();
    $placeholders = implode(', ', array_fill(0, sizeof($this->value), '%d'));
    $result = db_query("SELECT td.name, td.tid FROM {term_data} td WHERE td.tid IN ({$placeholders})", $this->value);
    while ($term = db_fetch_object($result)) {
      $term_names[$term->tid] = check_plain($term->name);
    }
    return theme('apachesolr_views_term_titles', $term_names);
  }

}

Members