function ViewsForm::__construct

Same name in other branches
  1. 9 core/modules/views/src/Form/ViewsForm.php \Drupal\views\Form\ViewsForm::__construct()
  2. 8.9.x core/modules/views/src/Form/ViewsForm.php \Drupal\views\Form\ViewsForm::__construct()
  3. 11.x 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;
}

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