function views_enable_view

views_enable_view(View $view)

Enables and saves a view.

Parameters

\Drupal\views\Entity\View $view: The View object to disable.

File

core/modules/views/views.module, line 582
Primarily Drupal hooks and global API functions to manipulate views.

Code

function views_enable_view(View $view) {
  $view->enable()->save();
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!modules!views!views.module/function/views_enable_view/8.1.x