function Views::getAllViews

Same name in other branches
  1. 9 core/modules/views/src/Views.php \Drupal\views\Views::getAllViews()
  2. 8.9.x core/modules/views/src/Views.php \Drupal\views\Views::getAllViews()
  3. 10 core/modules/views/src/Views.php \Drupal\views\Views::getAllViews()

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

Return value

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

2 calls to Views::getAllViews()
GroupwiseMax::buildOptionsForm in core/modules/views/src/Plugin/views/relationship/GroupwiseMax.php
Provide a form to edit options for this plugin.
ModuleTest::testLoadFunctions in core/modules/views/tests/src/Kernel/ModuleTest.php
Tests the load wrapper/helper functions.

File

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

Class

Views
Static service container wrapper for views.

Namespace

Drupal\views

Code

public static function getAllViews() {
    return \Drupal::entityTypeManager()->getStorage('view')
        ->loadMultiple();
}

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