function FormAjaxSubscriber::__construct

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

Constructs a new FormAjaxSubscriber.

Parameters

\Drupal\Core\Form\FormAjaxResponseBuilderInterface $formAjaxResponseBuilder: The form AJAX response builder.

\Drupal\Core\StringTranslation\TranslationInterface $string_translation: The string translation.

\Drupal\Core\Messenger\MessengerInterface $messenger: The messenger.

File

core/lib/Drupal/Core/Form/EventSubscriber/FormAjaxSubscriber.php, line 38

Class

FormAjaxSubscriber
Wraps AJAX form submissions that are triggered via an exception.

Namespace

Drupal\Core\Form\EventSubscriber

Code

public function __construct(protected FormAjaxResponseBuilderInterface $formAjaxResponseBuilder, TranslationInterface $string_translation, protected MessengerInterface $messenger) {
  $this->stringTranslation = $string_translation;
}

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