function views1_convert_style in Views (for Drupal 7) 6.3
Same name and namespace in other branches
- 6.2 includes/convert.inc \views1_convert_style()
1 call to views1_convert_style()
- views1_import in includes/
convert.inc - Convert a Views 1 view to a Views 2 view.
File
- includes/
convert.inc, line 410 - convert.inc
Code
function views1_convert_style(&$view, &$handler, $type) {
switch ($type) {
case 'list':
$handler
->set_option('style_plugin', 'list');
$handler
->set_option('style_options', array(
'type' => 'ul',
));
$handler
->set_option('row_plugin', 'fields');
break;
case 'node':
$handler
->set_option('row_plugin', 'node');
$handler
->set_option('row_options', array(
'teaser' => FALSE,
'links' => TRUE,
));
break;
case 'teaser':
$handler
->set_option('row_plugin', 'node');
$handler
->set_option('row_options', array(
'teaser' => TRUE,
'links' => TRUE,
));
break;
case 'table':
$options = array();
$options['columns'] = array();
$options['default'] = '';
$options['info'] = array();
$options['override'] = FALSE;
$options['order'] = 'asc';
$handler
->set_option('style_plugin', 'table');
$handler
->set_option('style_options', $options);
break;
case 'views_rss':
$feed_display = $view
->add_display('feed');
$feed_display
->set_option('style_plugin', 'rss');
$feed_display
->set_option('row_plugin', 'node_rss');
$feed_display
->set_option('path', $handler
->get_option('path'));
$feed_display
->set_options('displays', array(
$handler->id,
));
$feed_display
->set_option('page', $handler
->get_option('pager'));
break;
default:
// Ask around if anybody else knows.
foreach (module_implements('views_convert') as $module) {
module_invoke($module, 'views_convert', $handler->display->id, 'style', $view, $type);
}
}
}