You are here

function commons_follow_user_follow_filter::query in Drupal Commons 7.3

Add this filter to the query.

Due to the nature of fapi, the value and the operator have an unintended level of indirection. You will find them in $this->operator and $this->value respectively.

Overrides views_handler_filter_boolean_operator::query

File

modules/commons/commons_follow/includes/views/handlers/commons_follow_user_follow_filter.inc, line 13
Definition of views_handler_filter_boolean_operator_string.

Class

commons_follow_user_follow_filter
Views filter that toggles between flagged and unflagged content.

Code

function query() {
  foreach ($this->view->argument as $argument_name => $argument) {
    if ($argument->options['default_argument_type'] == 'commons_follow_node') {

      // The argument that toggles 'following' or 'not following' display.
      $this->view->argument[$argument_name]->options['not'] = !$this->value;
      break;
    }
  }
}