function FormSubmitter::__construct

Same name and namespace in other branches
  1. 11.x core/lib/Drupal/Core/Form/FormSubmitter.php \Drupal\Core\Form\FormSubmitter::__construct()
  2. 10 core/lib/Drupal/Core/Form/FormSubmitter.php \Drupal\Core\Form\FormSubmitter::__construct()
  3. 9 core/lib/Drupal/Core/Form/FormSubmitter.php \Drupal\Core\Form\FormSubmitter::__construct()
  4. 8.9.x core/lib/Drupal/Core/Form/FormSubmitter.php \Drupal\Core\Form\FormSubmitter::__construct()

File

core/lib/Drupal/Core/Form/FormSubmitter.php, line 23

Class

FormSubmitter
Provides submission processing for forms.

Namespace

Drupal\Core\Form

Code

public function __construct(protected RequestStack $requestStack, protected UrlGeneratorInterface $urlGenerator, protected RedirectResponseSubscriber $redirectResponseSubscriber, ?CallableResolver $callableResolver = NULL) {
  if (!$callableResolver) {
    @trigger_error(sprintf('Calling %s() without the $callableResolver param is deprecated in drupal:11.3.0 and is required in drupal:12.0.0. See https://www.drupal.org/node/3548821', __METHOD__), E_USER_DEPRECATED);
    $callableResolver = \Drupal::service(CallableResolver::class);
  }
  $this->callableResolver = $callableResolver;
}

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