public static function Views::getView in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/views/src/Views.php \Drupal\views\Views::getView()
Loads a view from configuration and returns its executable object.
Parameters
string $id: The view ID to load.
Return value
\Drupal\views\ViewExecutable A view executable instance, from the loaded entity.
307 calls to Views::getView()
- AccessPermissionTest::testAccessPerm in core/
modules/ user/ src/ Tests/ Views/ AccessPermissionTest.php - Tests perm access plugin.
- AccessPermissionTest::testRenderCaching in core/
modules/ user/ src/ Tests/ Views/ AccessPermissionTest.php - Tests access on render caching.
- AccessRoleTest::testRenderCaching in core/
modules/ user/ src/ Tests/ Views/ AccessRoleTest.php - Tests access on render caching.
- AccessTest::testAccessNone in core/
modules/ views/ src/ Tests/ Plugin/ AccessTest.php - Tests none access plugin.
- AccessTest::testStaticAccessPlugin in core/
modules/ views/ src/ Tests/ Plugin/ AccessTest.php - Tests static access check.
File
- core/
modules/ views/ src/ Views.php, line 126 - Contains \Drupal\views\Views.
Class
- Views
- Static service container wrapper for views.
Namespace
Drupal\viewsCode
public static function getView($id) {
$view = \Drupal::service('entity.manager')
->getStorage('view')
->load($id);
if ($view) {
return static::executableFactory()
->get($view);
}
}