W3cubDocs

/Drupal 8

public function FormBuilder::__construct

public FormBuilder::__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)

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\Component\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 166

Class

FormBuilder
Provides form building and processing.

Namespace

Drupal\Core\Form

Code

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;
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Form!FormBuilder.php/function/FormBuilder::__construct/8.1.x