You are here

function views_view_is_disabled in Views (for Drupal 7) 8.3

Same name and namespace in other branches
  1. 7.3 views.module \views_view_is_disabled()

Returns whether the view is disabled.

Parameters

Drupal\views\ViewStorage $view: The view object to check.

Return value

bool Returns TRUE if a view is disabled, FALSE otherwise.

2 calls to views_view_is_disabled()
ModuleTest::testLoadFunctions in lib/Drupal/views/Tests/ModuleTest.php
Tests the load wrapper/helper functions.
ModuleTest::testStatusFunctions in lib/Drupal/views/Tests/ModuleTest.php
Tests view enable and disable procedural wrapper functions.
1 string reference to 'views_view_is_disabled'
views_get_disabled_views in ./views.module
Returns an array of all disabled views, as fully loaded $view objects.

File

./views.module, line 1655
Primarily Drupal hooks and global API functions to manipulate views.

Code

function views_view_is_disabled(ViewStorage $view) {
  return !$view
    ->isEnabled();
}