You are here

class node_noindex_filter_handler in Node Noindex 6

Same name and namespace in other branches
  1. 7 node_noindex_filter_handler.inc \node_noindex_filter_handler

@file Filter by whether a node is indexed or not.

Hierarchy

Expanded class hierarchy of node_noindex_filter_handler

1 string reference to 'node_noindex_filter_handler'
node_noindex_views_data in ./node_noindex.views.inc
@file Register the node_noindex views filter handlers.

File

./node_noindex_filter_handler.inc, line 6
Filter by whether a node is indexed or not.

View source
class node_noindex_filter_handler extends views_handler_filter_boolean_operator {
  function construct() {
    parent::construct();
    $this->value_value = t('Is indexed');
  }
  function query() {
    $this
      ->ensure_my_table();
    if ($this->value == 1) {
      $this->query
        ->add_where($this->options['group'], "{$this->table_alias}.noindex is NULL || {$this->table_alias}.noindex = 0");
    }
    else {
      $this->query
        ->add_where($this->options['group'], "{$this->table_alias}.noindex = 1");
    }
  }

}

Members