function tripal_views_integration_discover_handlers
2.x tripal_views_integration_UI.inc | tripal_views_integration_discover_handlers() |
1.x tripal_views_integration.inc | tripal_views_integration_discover_handlers() |
Purpose: this function queries all modules currently enabled on the site looking for custom handlers and returns a list of all available handerls. The base View handlers are also included.
Return value
Returns an array of handler names
Related topics
1 call to tripal_views_integration_discover_handlers()
- tripal_views_integration_form in tripal_views/
includes/ tripal_views_integration_UI.inc - Purpose: defines the web form used for specifing the base table, joins and handlers when integrating a table with views. This form is used for both creating a new record and editing an existing record.
File
- tripal_views/
includes/ tripal_views_integration_UI.inc, line 1348 - Functions related to the UI for integrating tables with views
Code
function tripal_views_integration_discover_handlers() {
$handlers = array();
// Get handlers from all modules.
foreach (module_implements('views_handlers') as $module) {
$function = $module . '_views_handlers';
$result = $function();
if (!is_array($result)) {
continue;
}
foreach ($result['handlers'] as $handler => $parent) {
$handlers[] = $handler;
}
}
// these handlers are hard coded because I could not
// get the views_handlers() function to be called
// in the code above. However, we will be creating
// Chado wrappers for many of these and once that work
// is done these will no longer be needed.
// argument handlers
$handlers[] = 'views_handler_argument';
$handlers[] = 'views_handler_argument_numeric';
$handlers[] = 'views_handler_argument_formula';
$handlers[] = 'views_handler_argument_date';
$handlers[] = 'views_handler_argument_string';
$handlers[] = 'views_handler_argument_many_to_one';
$handlers[] = 'views_handler_argument_null';
// field handlers
$handlers[] = 'views_handler_field';
$handlers[] = 'views_handler_field_date';
$handlers[] = 'views_handler_field_boolean';
$handlers[] = 'views_handler_field_markup';
$handlers[] = 'views_handler_field_xss';
$handlers[] = 'views_handler_field_url';
$handlers[] = 'views_handler_field_file_size';
$handlers[] = 'views_handler_field_prerender_list';
$handlers[] = 'views_handler_field_numeric';
$handlers[] = 'views_handler_field_custom';
$handlers[] = 'views_handler_field_counter';
// filter handlers
$handlers[] = 'views_handler_filter';
$handlers[] = 'views_handler_filter_equality';
$handlers[] = 'views_handler_filter_string';
$handlers[] = 'views_handler_filter_boolean_operator';
$handlers[] = 'views_handler_filter_boolean_operator_string';
$handlers[] = 'views_handler_filter_in_operator';
$handlers[] = 'views_handler_filter_numeric';
$handlers[] = 'views_handler_filter_date';
$handlers[] = 'views_handler_filter_many_to_one';
// relationship handlers
$handlers[] = 'views_handler_relationship';
// sort handlers
$handlers[] = 'views_handler_sort';
$handlers[] = 'views_handler_sort_formula';
$handlers[] = 'views_handler_sort_date';
$handlers[] = 'views_handler_sort_menu_hierarchy';
$handlers[] = 'views_handler_sort_random';
// join handler
$handlers[] = 'views_join';
return $handlers;
}