You are here

function weight_handler_filter_weight_enabled::admin_summary in Weight 7.2

Display the filter on the administrative summary.

Overrides views_handler_filter::admin_summary

File

views/weight_handler_filter_weight_enabled.inc, line 42

Class

weight_handler_filter_weight_enabled

Code

function admin_summary() {
  if (!empty($this->options['exposed'])) {
    return t('exposed');
  }
  if (empty($this->value_options)) {
    $this
      ->get_value_options();
  }

  // Now that we have the valid options for this filter, just return the
  // human-readable label based on the current value.  The value_options
  // array is keyed with either 0 or 1, so if the current value is not
  // empty, use the label for 1, and if it's empty, use the label for 0.
  return $this->value_options[!empty($this->value)];
}