You are here

function notifications_views_handler_filter_subscription_type::get_value_options in Notifications 7

Same name and namespace in other branches
  1. 6.4 notifications_views/notifications_views_handler_filter_subscription_type.inc \notifications_views_handler_filter_subscription_type::get_value_options()
  2. 6 notifications_views/notifications_views_handler_filter_subscription_type.inc \notifications_views_handler_filter_subscription_type::get_value_options()
  3. 6.2 notifications_views/notifications_views_handler_filter_subscription_type.inc \notifications_views_handler_filter_subscription_type::get_value_options()
  4. 6.3 notifications_views/notifications_views_handler_filter_subscription_type.inc \notifications_views_handler_filter_subscription_type::get_value_options()

Child classes should be used to override this function and set the 'value options', unless 'options callback' is defined as a valid function or static public method to generate these values.

This can use a guard to be used to reduce database hits as much as possible.

Return value

Return the stored values in $this->value_options if someone expects it.

Overrides views_handler_filter_in_operator::get_value_options

File

notifications_views/includes/notifications_views_handler_filter_subscription_type.inc, line 8

Class

notifications_views_handler_filter_subscription_type
Filter by node type

Code

function get_value_options() {
  if (!isset($this->value_options)) {
    $this->value_title = t('Subscription type');
    $subtypes = notifications_subscription_type();
    $options = array();
    foreach ($subtypes as $type => $info) {
      $options[$type] = $info['title'];
    }
    $this->value_options = $options;
  }
}