function views_view_is_disabled

Same name and namespace in other branches
  1. 11.x core/modules/views/views.module \views_view_is_disabled()
  2. 10 core/modules/views/views.module \views_view_is_disabled()
  3. 9 core/modules/views/views.module \views_view_is_disabled()
  4. 8.9.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.

Deprecated

in drupal:11.4.0 and is removed from drupal:13.0.0. Use !$view->status() instead.

See also

https://www.drupal.org/node/3572594

File

core/modules/views/views.module, line 189

Code

function views_view_is_disabled(View $view) {
  @trigger_error(__FUNCTION__ . '() is deprecated in drupal:11.4.0 and is removed from drupal:13.0.0. Use !$view->status() instead. See https://www.drupal.org/node/3572594', E_USER_DEPRECATED);
  return !$view->status();
}

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