You are here

function commons_follow_user_follow_filter_message::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_message.inc, line 13
Definition of views_handler_filter_boolean_operator_string.

Class

commons_follow_user_follow_filter_message
Views filter that toggles between flagged and unflagged content.

Code

function query() {

  // The argument that toggles 'following' or 'not following' display.
  if ($this->value == 0) {
    foreach ($this->view->argument as $argument_name => $argument) {
      if ($argument->options['default_argument_type'] == 'commons_follow_message') {
        $this->view->argument[$argument_name]->options['not'] = !$this->value;
      }
    }
  }
}