You are here

protected function WebformSubmissionResendForm::getMessageHandler in Webform 6.x

Same name and namespace in other branches
  1. 8.5 src/Form/WebformSubmissionResendForm.php \Drupal\webform\Form\WebformSubmissionResendForm::getMessageHandler()

Get message handler from webform state.

Parameters

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

Return value

\Drupal\webform\Plugin\WebformHandlerMessageInterface The current message handler.

File

src/Form/WebformSubmissionResendForm.php, line 179

Class

WebformSubmissionResendForm
Defines a webform that resends webform submission.

Namespace

Drupal\webform\Form

Code

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