You are here

class uc_product_handler_filter_product in Ubercart 6.2

Same name and namespace in other branches
  1. 7.3 uc_product/views/uc_product_handler_filter_product.inc \uc_product_handler_filter_product

Filters nodes based on whether they have an entry in the uc_products table.

Hierarchy

Expanded class hierarchy of uc_product_handler_filter_product

1 string reference to 'uc_product_handler_filter_product'
uc_product_views_data in uc_product/views/uc_product.views.inc
Implements hook_views_data().

File

uc_product/views/uc_product_handler_filter_product.inc, line 11
Views handler: Node filter on "product-ness".

View source
class uc_product_handler_filter_product extends views_handler_filter_boolean_operator {

  /**
   * Overrides views_handler_field::query().
   */
  function query() {
    $types = uc_product_types();
    $this->query
      ->add_field('node', 'type');
    $this->query
      ->add_where($this->options['group'], "node.type " . (empty($this->value) ? "NOT " : "") . "IN (" . db_placeholders($types, 'varchar') . ")", $types);
  }

}

Members