You are here

function views_new_view in Views (for Drupal 7) 8.3

Same name and namespace in other branches
  1. 6.3 views.module \views_new_view()
  2. 6.2 views.module \views_new_view()
  3. 7.3 views.module \views_new_view()

Create an empty view to work with.

Return value

Drupal\views\ViewStorage A fully formed, empty $view object. This object must be populated before it can be successfully saved.

1 call to views_new_view()
HandlerAllTest::testHandlers in lib/Drupal/views/Tests/Handler/HandlerAllTest.php
Tests most of the handlers.

File

./views.module, line 1458
Primarily Drupal hooks and global API functions to manipulate views.

Code

function views_new_view() {
  return entity_create('view', array());
}