function _views_data_export_migratable_displays in Views data export 6.2
Same name and namespace in other branches
- 6.3 migration/views_data_export_migration.module \_views_data_export_migratable_displays()
- 6 migration/views_data_export_migration.module \_views_data_export_migratable_displays()
Helper function that returns all the migratable displays in a given view
2 calls to _views_data_export_migratable_displays()
- views_data_export_migratable_views in migration/
views_data_export_migration.module - Return an array of all views / displays that are migratable from views_bonus_export to views_data_export
- views_data_export_migration_convert in migration/
views_data_export_migration.module - Converts all views_bonus_export displays on the given view to views_data_export displays and returns the new view
File
- migration/
views_data_export_migration.module, line 96 - Provides helpers and UI (admin/build/views/tools/views-data-export-migration) for migrating views_bonus_export views to views_data_export.
Code
function _views_data_export_migratable_displays($view) {
static $views_bonus_style_plugins;
if (!isset($views_bonus_style_plugins)) {
// I suppose we could try and grab this list from the module itself
$views_bonus_style_plugins = array_keys(_views_data_export_migration_style_plugin_mappings());
}
$relevant_displays = array();
foreach ($view->display as $dn => $d) {
if ($d->display_plugin == 'feed') {
$view
->set_display($dn);
if (in_array($view->display_handler
->get_option('style_plugin'), $views_bonus_style_plugins)) {
$relevant_displays[$view->current_display] = $view->current_display;
}
}
}
//dsm($relevant_displays);
return $relevant_displays;
}