You are here

function views_handler_filter_system_status::get_value_options in Views System 6.2

Same name and namespace in other branches
  1. 6.3 views/handlers/views_handler_filter_system_status.inc \views_handler_filter_system_status::get_value_options()
  2. 7.3 views/handlers/views_handler_filter_system_status.inc \views_handler_filter_system_status::get_value_options()

File

views/handlers/views_handler_filter_system_status.inc, line 17
Views filter handler for the views_system module.

Class

views_handler_filter_system_status
Provides status filter options for the system item.

Code

function get_value_options() {
  if (isset($this->definition['type'])) {
    if ($this->definition['type'] == 'true-false') {
      $this->value_options = array(
        1 => t('True'),
        0 => t('False'),
      );
    }
    if ($this->definition['type'] == 'yes-no') {
      $this->value_options = array(
        1 => t('Yes'),
        0 => t('No'),
      );
    }
    if ($this->definition['type'] == 'on-off') {
      $this->value_options = array(
        1 => t('On'),
        0 => t('Off'),
      );
    }
  }
  if (!isset($this->value_options)) {
    $this->value_options = array(
      1 => t('Enabled'),
      0 => t('Disabled'),
    );
  }
}