function views_new_view

Same name in other branches
  1. 7.x-3.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 987

Code

function views_new_view() {
    views_include('view');
    $view = new view();
    $view->vid = 'new';
    $view->add_display('default');
    return $view;
}