function FormBuilder::__construct
Same name in other branches
- 9 core/lib/Drupal/Core/Form/FormBuilder.php \Drupal\Core\Form\FormBuilder::__construct()
- 8.9.x core/lib/Drupal/Core/Form/FormBuilder.php \Drupal\Core\Form\FormBuilder::__construct()
- 11.x core/lib/Drupal/Core/Form/FormBuilder.php \Drupal\Core\Form\FormBuilder::__construct()
Constructs a new FormBuilder.
Parameters
\Drupal\Core\Form\FormValidatorInterface $form_validator: The form validator.
\Drupal\Core\Form\FormSubmitterInterface $form_submitter: The form submission processor.
\Drupal\Core\Form\FormCacheInterface $form_cache: The form cache.
\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler.
\Symfony\Contracts\EventDispatcher\EventDispatcherInterface $event_dispatcher: The event dispatcher.
\Symfony\Component\HttpFoundation\RequestStack $request_stack: The request stack.
\Drupal\Core\DependencyInjection\ClassResolverInterface $class_resolver: The class resolver.
\Drupal\Core\Render\ElementInfoManagerInterface $element_info: The element info manager.
\Drupal\Core\Theme\ThemeManagerInterface $theme_manager: The theme manager.
\Drupal\Core\Access\CsrfTokenGenerator $csrf_token: The CSRF token generator.
File
-
core/
lib/ Drupal/ Core/ Form/ FormBuilder.php, line 175
Class
- FormBuilder
- Provides form building and processing.
Namespace
Drupal\Core\FormCode
public function __construct(FormValidatorInterface $form_validator, FormSubmitterInterface $form_submitter, FormCacheInterface $form_cache, ModuleHandlerInterface $module_handler, EventDispatcherInterface $event_dispatcher, RequestStack $request_stack, ClassResolverInterface $class_resolver, ElementInfoManagerInterface $element_info, ThemeManagerInterface $theme_manager, ?CsrfTokenGenerator $csrf_token = NULL) {
$this->formValidator = $form_validator;
$this->formSubmitter = $form_submitter;
$this->formCache = $form_cache;
$this->moduleHandler = $module_handler;
$this->eventDispatcher = $event_dispatcher;
$this->requestStack = $request_stack;
$this->classResolver = $class_resolver;
$this->elementInfo = $element_info;
$this->csrfToken = $csrf_token;
$this->themeManager = $theme_manager;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.