views_enable_view(View $view)
Enables and saves a view.
Parameters
\Drupal\views\Entity\View $view: The View object to disable.
File
- core/modules/views/views.module, line 582
- Primarily Drupal hooks and global API functions to manipulate views.
Code
1 2 3 | function views_enable_view(View $view ) { $view ->enable()->save(); } |
Please login to continue.