function views_disable_view in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/views/views.module \views_disable_view()
Disables and saves a view.
Parameters
\Drupal\views\Entity\View $view: The View object to disable.
1 call to views_disable_view()
- ModuleTest::testStatusFunctions in core/
modules/ views/ src/ Tests/ ModuleTest.php - Tests view enable and disable procedural wrapper functions.
File
- core/
modules/ views/ views.module, line 596 - Primarily Drupal hooks and global API functions to manipulate views.
Code
function views_disable_view(View $view) {
$view
->disable()
->save();
}