function panels_views_legacy_add in Panels 5.2
Returns the form for a new view.
1 string reference to 'panels_views_legacy_add'
- panels_views_legacy_panels_content_types in panels_views_legacy/
panels_views_legacy.module - Implementation of hook_panels_content_types()
File
- panels_views_legacy/
panels_views_legacy.module, line 209 - panels_views_legacy.module
Code
function panels_views_legacy_add($id, $parents, $conf = array()) {
$view = views_get_view($id);
if (!$view) {
return;
}
$conf['view'] = $id;
if ($view->page) {
$conf['type'] = 'page';
$conf['nodes_per_page'] = $view->nodes_per_page;
}
else {
$conf['type'] = 'block';
$conf['nodes_per_page'] = $view->nodes_per_block;
}
$conf['type'] = 'embed';
$conf['pager_id'] = 1;
$conf['use_pager'] = 0;
return panels_views_legacy_edit($id, $parents, $conf);
}