function views_view_is_enabled in Drupal 10
Same name and namespace in other branches
- 8 core/modules/views/views.module \views_view_is_enabled()
- 9 core/modules/views/views.module \views_view_is_enabled()
Returns whether the view is enabled.
Parameters
\Drupal\views\Entity\View $view: The view object to check.
Return value
bool Returns TRUE if a view is enabled, FALSE otherwise.
2 calls to views_view_is_enabled()
- ModuleTest::testLoadFunctions in core/
modules/ views/ tests/ src/ Kernel/ ModuleTest.php - Tests the load wrapper/helper functions.
- 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 577 - Primarily Drupal hooks and global API functions to manipulate views.
Code
function views_view_is_enabled(View $view) {
return $view
->status();
}