Views::getDisabledViews

public static 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 268

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::entityManager()->getStorage('view')->loadMultiple($query);
}
doc_Drupal
2016-10-29 09:54:48
Comments
Leave a Comment

Please login to continue.