You are here

protected function YamlFormSubmissionResendForm::getMessageHandler in YAML Form 8

Get message handler from form state.

Parameters

\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.

Return value

\Drupal\yamlform\YamlFormHandlerMessageInterface The current message handler.

3 calls to YamlFormSubmissionResendForm::getMessageHandler()
YamlFormSubmissionResendForm::buildForm in src/Form/YamlFormSubmissionResendForm.php
Form constructor.
YamlFormSubmissionResendForm::submitForm in src/Form/YamlFormSubmissionResendForm.php
Form submission handler.
YamlFormSubmissionResendForm::updateMessage in src/Form/YamlFormSubmissionResendForm.php
Handles switching between messages.

File

src/Form/YamlFormSubmissionResendForm.php, line 226

Class

YamlFormSubmissionResendForm
Defines a form that resends form submission.

Namespace

Drupal\yamlform\Form

Code

protected function getMessageHandler(FormStateInterface $form_state) {
  $message_handler_id = $form_state
    ->getValue('message_handler_id');
  return $this->yamlformSubmission
    ->getYamlForm()
    ->getHandler($message_handler_id);
}