function views_disable_view
views_disable_view(View $view)
Disables and saves a view.
Parameters
\Drupal\views\Entity\View $view: The View object to disable.
File
- core/modules/views/views.module, line 592
- Primarily Drupal hooks and global API functions to manipulate views.
Code
function views_disable_view(View $view) { $view->disable()->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_disable_view/8.1.x