function message_handler_filter_message_type_category::get_value_options in Message 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/
views/ handlers/ message_handler_filter_message_type_category.inc, line 4
Class
Code
function get_value_options() {
if (!isset($this->value_options)) {
$this->value_title = t('Message type category');
$options = array();
$options['message_type'] = t('Default message type category');
foreach (message_type_category_load() as $message_category) {
$options[$message_category->category] = !empty($message_category->description) ? $message_category->description : $message_type->category;
}
$this->value_options = $options;
}
}