function views_view_is_disabled

Returns whether the view is disabled.

Parameters

Drupal\views\Plugin\Core\Entity\View $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 drupal/core/modules/views/lib/Drupal/views/Tests/ModuleTest.php
Tests the load wrapper/helper functions.
ModuleTest::testStatusFunctions in drupal/core/modules/views/lib/Drupal/views/Tests/ModuleTest.php
Tests view enable and disable procedural wrapper functions.

File

drupal/core/modules/views/views.module, line 1140
Primarily Drupal hooks and global API functions to manipulate views.

Code

function views_view_is_disabled(View $view) {
  return !$view
    ->status();
}