You are here

public function bat_event_handler_event_state_filter::get_value_options in Booking and Availability Management Tools for Drupal 7

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

modules/bat_event/views/bat_event_handler_event_state_filter.inc, line 15

Class

bat_event_handler_event_state_filter

Code

public function get_value_options() {
  $options = array();
  foreach (bat_event_get_states() as $state) {
    $options[$state['id']] = $state['label'];
  }
  $this->value_options = $options;
  return $this->value_options;
}