public function YamlFormSubmissionResendForm::submitForm in YAML Form 8
Form submission handler.
Parameters
array $form: An associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
Overrides FormInterface::submitForm
File
- src/
Form/ YamlFormSubmissionResendForm.php, line 206
Class
- YamlFormSubmissionResendForm
- Defines a form that resends form submission.
Namespace
Drupal\yamlform\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$params = $form_state
->getValue('message');
$message_handler = $this
->getMessageHandler($form_state);
$message_handler
->sendMessage($params);
$t_args = [
'%label' => $message_handler
->label(),
];
drupal_set_message($this
->t('Successfully re-sent %label.', $t_args));
}