function views_disable_view

Disables and saves a view.

Parameters

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

1 call to views_disable_view()
ModuleTest::testStatusFunctions in drupal/core/modules/views/lib/Drupal/views/Tests/ModuleTest.php
Tests view enable and disable procedural wrapper functions.

File

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

Code

function views_disable_view(View $view) {
  $view
    ->disable()
    ->save();
}