function views_get_enabled_views

Returns an array of all enabled views, as fully loaded $view objects.

2 calls to views_get_enabled_views()
ModuleTest::testLoadFunctions in drupal/core/modules/views/lib/Drupal/views/Tests/ModuleTest.php
Tests the load wrapper/helper functions.
views_plugin_list in drupal/core/modules/views/views.module
Returns a list of plugins and metadata about them.

File

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

Code

function views_get_enabled_views() {
  $query = Drupal::entityQuery('view')
    ->condition('status', TRUE)
    ->execute();
  return entity_load_multiple('view', $query);
}