function views_new_view
3.x views.module | views_new_view() |
2.x views.module | views_new_view() |
Create an empty view to work with.
Return value
view A fully formed, empty $view object. This object must be populated before it can be successfully saved.
2 calls to views_new_view()
- views1_import in includes/
convert.inc - Convert a Views 1 view to a Views 2 view.
- views_ui_add_form_submit in includes/
admin.inc - Process the add view form
File
- ./
views.module, line 775 - Primarily Drupal hooks and global API functions to manipulate views.
Code
function views_new_view() {
views_include('view');
$view = new view();
$view->vid = 'new';
$view->add_display('default');
return $view;
}