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