You are here

views_handler_argument_term_edge_parent_tid.inc in Taxonomy Edge 7.2

File

views_taxonomy_edge/handlers/views_handler_argument_term_edge_parent_tid.inc
View source
<?php

/**
 * @file
 */
class views_handler_argument_term_edge_parent_tid extends views_handler_argument_numeric {
  function query() {
    $this
      ->ensure_my_table();
    $subquery = db_select('taxonomy_term_edge_path', 'path_parent')
      ->fields('path_parent', array(
      'pid',
    ))
      ->condition('tid', $this->value);
    $this->query
      ->add_where(0, "{$this->table_alias}.{$this->real_field}", $subquery, 'IN');
  }

}