function views_new_view in Views (for Drupal 7) 6.3
Same name and namespace in other branches
- 8.3 views.module \views_new_view()
- 6.2 views.module \views_new_view()
- 7.3 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 987 - 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;
}