You are here

public function ViewsForm::__construct in Drupal 9

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

Constructs a ViewsForm object.

Parameters

\Drupal\Core\DependencyInjection\ClassResolverInterface $class_resolver: The class resolver to get the subform form objects.

\Drupal\Core\Routing\UrlGeneratorInterface $url_generator: The url generator to generate the form action.

\Symfony\Component\HttpFoundation\RequestStack $requestStack: The request stack.

string $view_id: The ID of the view.

string $view_display_id: The ID of the active view's display.

string[] $view_args: The arguments passed to the active view.

File

core/modules/views/src/Form/ViewsForm.php, line 86

Class

ViewsForm
Provides a base class for single- or multistep view forms.

Namespace

Drupal\views\Form

Code

public function __construct(ClassResolverInterface $class_resolver, UrlGeneratorInterface $url_generator, RequestStack $requestStack, $view_id, $view_display_id, array $view_args) {
  $this->classResolver = $class_resolver;
  $this->urlGenerator = $url_generator;
  $this->requestStack = $requestStack;
  $this->viewId = $view_id;
  $this->viewDisplayId = $view_display_id;
  $this->viewArguments = $view_args;
}