You are here

function office_hours_handler_filter_open::get_value_options in Office Hours 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

includes/office_hours_handler_filter_open.inc, line 14
Implements Views integration: filter 'open now'.

Class

office_hours_handler_filter_open
@file Implements Views integration: filter 'open now'.

Code

function get_value_options() {
  if (isset($this->value_options)) {
    return $this->value_options;
  }

  // Use bitcode keys, for better analysis in post_execute().
  $this->value_options = array(
    1 => t('Open now'),
    2 => t('Open today'),
    4 => t('Already Closed'),
    8 => t('Closed today'),
  );
  return $this->value_options;
}