1 views_handler_filter_in_operator.inc views_handler_filter_in_operator::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.:


core/modules/views/handlers/views_handler_filter_in_operator.inc, line 50
Definition of views_handler_filter_in_operator.


Simple filter to handle matching of multiple options selectable via checkboxes


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

  if (isset($this->definition['options callback']) && is_callable($this->definition['options callback'])) {
    if (isset($this->definition['options arguments']) && is_array($this->definition['options arguments'])) {
      $this->value_options = call_user_func_array($this->definition['options callback'], $this->definition['options arguments']);
    else {
      $this->value_options = call_user_func($this->definition['options callback']);
  else {
    $this->value_options = array(t('Yes'), t('No'));

  return $this->value_options;