function views_bulk_operations_views_list in Views Bulk Operations (VBO) 7.3
Lists all available VBO Views and their displays. Naturally, only the displays that contain a VBO field are listed.
Return value
array An array of all views and their displays on the form 'view|display', formatted to be used as an select list.
2 string references to 'views_bulk_operations_views_list'
File
- ./
views_bulk_operations.rules.inc, line 114 - Views Bulk Operations conditions and actions for Rules.
Code
function views_bulk_operations_views_list() {
$selectable_displays = array();
foreach (views_get_enabled_views() as $name => $base_view) {
foreach ($base_view->display as $display_name => $display) {
$view = $base_view
->clone_view();
if (!$view
->set_display($display_name)) {
continue;
}
// Initialize the style plugin and only continue to initialize handlers
// if the style uses fields.
if (!$view
->init_style() || !$view->style_plugin
->uses_fields()) {
continue;
}
$view
->init_handlers($display_name);
if (_views_bulk_operations_get_field($view)) {
$selectable_displays[$view->name . '|' . $display_name] = check_plain($view->human_name . ' | ' . $display->display_title);
}
}
}
return $selectable_displays;
}