function views_new_view in Views (for Drupal 7) 7.3
Same name and namespace in other branches
- 8.3 views.module \views_new_view()
- 6.3 views.module \views_new_view()
- 6.2 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.
1 call to views_new_view()
- ViewsUiBaseViewsWizard::instantiate_view in plugins/
views_wizard/ views_ui_base_views_wizard.class.php
1 string reference to 'views_new_view'
- views_schema_6000 in ./
views.install - Views 2's initial schema.
File
- ./
views.module, line 1537 - 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;
}