You are here

public function FormAjaxSubscriber::__construct in Drupal 10

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Form/EventSubscriber/FormAjaxSubscriber.php \Drupal\Core\Form\EventSubscriber\FormAjaxSubscriber::__construct()
  2. 9 core/lib/Drupal/Core/Form/EventSubscriber/FormAjaxSubscriber.php \Drupal\Core\Form\EventSubscriber\FormAjaxSubscriber::__construct()

Constructs a new FormAjaxSubscriber.

Parameters

\Drupal\Core\Form\FormAjaxResponseBuilderInterface $form_ajax_response_builder: 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 51

Class

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

Namespace

Drupal\Core\Form\EventSubscriber

Code

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