function views_get_view

Loads a view from configuration.

Parameters

string $name: The name of the view.

Return value

Drupal\views\ViewExecutable A reference to the $view object.

204 calls to views_get_view()
AccessPermissionTest::testAccessPerm in drupal/core/modules/user/lib/Drupal/user/Tests/Views/AccessPermissionTest.php
Tests perm access plugin.
AccessRoleTest::testAccessRole in drupal/core/modules/user/lib/Drupal/user/Tests/Views/AccessRoleTest.php
Tests role access plugin.
AccessTest::testAccessNone in drupal/core/modules/views/lib/Drupal/views/Tests/Plugin/AccessTest.php
Tests none access plugin.
AccessTest::testStaticAccessPlugin in drupal/core/modules/views/lib/Drupal/views/Tests/Plugin/AccessTest.php
Tests static access check.
AreaEntityTest::testEntityArea in drupal/core/modules/views/lib/Drupal/views/Tests/Handler/AreaEntityTest.php
Tests the area handler.

... See full list

2 string references to 'views_get_view'
ViewAddFormController::form in drupal/core/modules/views_ui/lib/Drupal/views_ui/ViewAddFormController.php
Overrides Drupal\Core\Entity\EntityFormController::form().
ViewCloneFormController::form in drupal/core/modules/views_ui/lib/Drupal/views_ui/ViewCloneFormController.php
Overrides \Drupal\Core\Entity\EntityFormController::form().

File

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

Code

function views_get_view($name) {
  $view = entity_load('view', $name);
  if ($view) {
    return $view
      ->get('executable');
  }
}