function FormValidator::__construct
Same name in other branches
- 8.9.x core/lib/Drupal/Core/Form/FormValidator.php \Drupal\Core\Form\FormValidator::__construct()
- 10 core/lib/Drupal/Core/Form/FormValidator.php \Drupal\Core\Form\FormValidator::__construct()
- 11.x core/lib/Drupal/Core/Form/FormValidator.php \Drupal\Core\Form\FormValidator::__construct()
Constructs a new FormValidator.
Parameters
\Symfony\Component\HttpFoundation\RequestStack $request_stack: The request stack.
\Drupal\Core\StringTranslation\TranslationInterface $string_translation: The string translation service.
\Drupal\Core\Access\CsrfTokenGenerator $csrf_token: The CSRF token generator.
\Psr\Log\LoggerInterface $logger: A logger instance.
\Drupal\Core\Form\FormErrorHandlerInterface $form_error_handler: The form error handler.
File
-
core/
lib/ Drupal/ Core/ Form/ FormValidator.php, line 62
Class
- FormValidator
- Provides validation of form submissions.
Namespace
Drupal\Core\FormCode
public function __construct(RequestStack $request_stack, TranslationInterface $string_translation, CsrfTokenGenerator $csrf_token, LoggerInterface $logger, FormErrorHandlerInterface $form_error_handler) {
$this->requestStack = $request_stack;
$this->stringTranslation = $string_translation;
$this->csrfToken = $csrf_token;
$this->logger = $logger;
$this->formErrorHandler = $form_error_handler;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.