public FormValidator::__construct(RequestStack $request_stack, TranslationInterface $string_translation, CsrfTokenGenerator $csrf_token, LoggerInterface $logger, FormErrorHandlerInterface $form_error_handler)
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 63
Class
- FormValidator
- Provides validation of form submissions.
Namespace
Drupal\Core\Form
Code
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; }
Please login to continue.