function views_view_is_disabled

Same name in other branches
  1. 8.9.x core/modules/views/views.module \views_view_is_disabled()
  2. 10 core/modules/views/views.module \views_view_is_disabled()
  3. 11.x core/modules/views/views.module \views_view_is_disabled()

Returns whether the view is disabled.

Parameters

\Drupal\views\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 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 600

Code

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

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.