uc_product_kit_handler_filter_product_kit.inc 522 B

12345678910111213141516171819
  1. <?php
  2. /**
  3. * @file
  4. * Views handler: Node filter on "product-kit-ness".
  5. */
  6. /**
  7. * Filters nodes based on whether they have an entry in the uc_product_kit table.
  8. */
  9. class uc_product_kit_handler_filter_product_kit extends views_handler_filter_boolean_operator {
  10. /**
  11. * Overrides views_handler_field::query().
  12. */
  13. function query() {
  14. $this->query->add_field('node', 'type');
  15. $this->query->add_where($this->options['group'], "node.type " . (empty($this->value) ? "NOT " : "") . "IN ('product_kit')");
  16. }
  17. }