public static function Views::getAllViews in Drupal 10
Same name and namespace in other branches
- 8 core/modules/views/src/Views.php \Drupal\views\Views::getAllViews()
- 9 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.
1 call to Views::getAllViews()
- 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 246
Class
- Views
- Static service container wrapper for views.
Namespace
Drupal\viewsCode
public static function getAllViews() {
return \Drupal::entityTypeManager()
->getStorage('view')
->loadMultiple();
}