You are here

function message_handler_filter_message_type_category::query in Message 7

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_in_operator::query

File

includes/views/handlers/message_handler_filter_message_type_category.inc, line 16

Class

message_handler_filter_message_type_category

Code

function query() {

  // Post-process the value before the query.
  if (empty($this->value)) {
    return;
  }
  $values = array();
  foreach (message_type_load() as $message_type) {
    if (isset($this->value[$message_type->category])) {
      $values[] = $message_type->name;
    }
  }
  $this->value = $values;
  return parent::query();
}