function ViewAjaxController::__construct

Same name in other branches
  1. 9 core/modules/views/src/Controller/ViewAjaxController.php \Drupal\views\Controller\ViewAjaxController::__construct()
  2. 8.9.x core/modules/views/src/Controller/ViewAjaxController.php \Drupal\views\Controller\ViewAjaxController::__construct()
  3. 10 core/modules/views/src/Controller/ViewAjaxController.php \Drupal\views\Controller\ViewAjaxController::__construct()

Constructs a ViewAjaxController object.

Parameters

\Drupal\Core\Entity\EntityStorageInterface $storage: The entity storage for views.

\Drupal\views\ViewExecutableFactory $executable_factory: The factory to load a view executable with.

\Drupal\Core\Render\RendererInterface $renderer: The renderer.

\Drupal\Core\Path\CurrentPathStack $current_path: The current path.

\Drupal\Core\Routing\RedirectDestinationInterface $redirect_destination: The redirect destination.

File

core/modules/views/src/Controller/ViewAjaxController.php, line 95

Class

ViewAjaxController
Defines a controller to load a view via AJAX.

Namespace

Drupal\views\Controller

Code

public function __construct(EntityStorageInterface $storage, ViewExecutableFactory $executable_factory, RendererInterface $renderer, CurrentPathStack $current_path, RedirectDestinationInterface $redirect_destination) {
    $this->storage = $storage;
    $this->executableFactory = $executable_factory;
    $this->renderer = $renderer;
    $this->currentPath = $current_path;
    $this->redirectDestination = $redirect_destination;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.