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(); }
Please login to continue.