public function views_handler_filter_in_operator::get_value_options in Views (for Drupal 7) 7.3
Same name and namespace in other branches
- 6.3 handlers/views_handler_filter_in_operator.inc \views_handler_filter_in_operator::get_value_options()
- 6.2 handlers/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.
3 calls to views_handler_filter_in_operator::get_value_options()
- views_handler_filter_in_operator::admin_summary in handlers/
views_handler_filter_in_operator.inc - Display the filter on the administrative summary.
- views_handler_filter_in_operator::validate in handlers/
views_handler_filter_in_operator.inc - Validates the handler against the complete View.
- views_handler_filter_in_operator::value_form in handlers/
views_handler_filter_in_operator.inc - Options form subform for setting options.
18 methods override views_handler_filter_in_operator::get_value_options()
- views_handler_filter_aggregator_category_cid::get_value_options in modules/
aggregator/ views_handler_filter_aggregator_category_cid.inc - 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.
- views_handler_filter_entity_bundle::get_value_options in handlers/
views_handler_filter_entity_bundle.inc - 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.
- views_handler_filter_field_list::get_value_options in modules/
field/ views_handler_filter_field_list.inc - 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.
- views_handler_filter_file_status::get_value_options in modules/
system/ views_handler_filter_file_status.inc - 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.
- views_handler_filter_locale_group::get_value_options in modules/
locale/ views_handler_filter_locale_group.inc - 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.
File
- handlers/
views_handler_filter_in_operator.inc, line 51 - Definition of views_handler_filter_in_operator.
Class
- views_handler_filter_in_operator
- Simple filter to handle matching of multiple options using checkboxes.
Code
public function get_value_options() {
if (isset($this->value_options)) {
return;
}
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;
}