public static function Views::getEnabledViews in Zircon Profile 8.0
Same name and namespace in other branches
- 8 core/modules/views/src/Views.php \Drupal\views\Views::getEnabledViews()
Returns an array of all enabled views.
Return value
\Drupal\views\Entity\View[] An array of loaded enabled view entities.
3 calls to Views::getEnabledViews()
- ModuleTest::testLoadFunctions in core/
modules/ views/ src/ Tests/ ModuleTest.php - Tests the load wrapper/helper functions.
- Views::pluginList in core/
modules/ views/ src/ Views.php - Returns a list of plugins and metadata about them.
- ViewsListTest::testViewsListLimit in core/
modules/ views_ui/ src/ Tests/ ViewsListTest.php - Tests that the views list does not use a pager.
File
- core/
modules/ views/ src/ Views.php, line 259 - Contains \Drupal\views\Views.
Class
- Views
- Static service container wrapper for views.
Namespace
Drupal\viewsCode
public static function getEnabledViews() {
$query = \Drupal::entityQuery('view')
->condition('status', TRUE)
->execute();
return \Drupal::entityManager()
->getStorage('view')
->loadMultiple($query);
}