You are here

public function ViewExecutable::__construct in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/views/src/ViewExecutable.php \Drupal\views\ViewExecutable::__construct()

Constructs a new ViewExecutable object.

Parameters

\Drupal\views\ViewEntityInterface $storage: The view config entity the actual information is stored on.

\Drupal\Core\Session\AccountInterface $user: The current user.

\Drupal\views\ViewsData $views_data: The views data.

\Drupal\Core\Routing\RouteProviderInterface $route_provider: The route provider.

File

core/modules/views/src/ViewExecutable.php, line 461

Class

ViewExecutable
Represents a view as a whole.

Namespace

Drupal\views

Code

public function __construct(ViewEntityInterface $storage, AccountInterface $user, ViewsData $views_data, RouteProviderInterface $route_provider) {

  // Reference the storage and the executable to each other.
  $this->storage = $storage;
  $this->storage
    ->set('executable', $this);
  $this->user = $user;
  $this->viewsData = $views_data;
  $this->routeProvider = $route_provider;
}