function activity_views_handler_filter_actions_id::get_value_options in Activity 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
- views/
views_handler_filters.inc, line 82 - Provides the Views Filter Handlers.
Class
Code
function get_value_options() {
if (!isset($this->value_options)) {
$this->value_title = t('Activity Template');
$results = db_query("SELECT aid, label FROM {actions} WHERE type = 'activity'")
->fetchAllAssoc('aid');
foreach ($results as $actions_id => $row) {
$this->value_options[$actions_id] = check_plain($row->label);
}
}
}