Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Views.php

function Views::getDisabledViews

Returns an array of all disabled views.

Return value

\Drupal\views\Entity\View[] An array of loaded disabled view entities.

File

core/modules/views/src/Views.php, line 272

Class

Views
Static service container wrapper for views.

Namespace

Drupal\views

Code

public static function getDisabledViews() {
    $query = \Drupal::entityQuery('view')->condition('status', FALSE)
        ->execute();
    return \Drupal::entityTypeManager()->getStorage('view')
        ->loadMultiple($query);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal