public function DebugYamlFormHandler::submitForm in YAML Form 8
Same name in this branch
- 8 modules/yamlform_devel/src/Plugin/YamlFormHandler/DebugYamlFormHandler.php \Drupal\yamlform_devel\Plugin\YamlFormHandler\DebugYamlFormHandler::submitForm()
- 8 tests/modules/yamlform_test/src/Plugin/YamlFormHandler/DebugYamlFormHandler.php \Drupal\yamlform_test\Plugin\YamlFormHandler\DebugYamlFormHandler::submitForm()
Submit form submission form.
Parameters
array $form: An associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
\Drupal\yamlform\YamlFormSubmissionInterface $yamlform_submission: A form submission.
Overrides YamlFormHandlerBase::submitForm
File
- modules/
yamlform_devel/ src/ Plugin/ YamlFormHandler/ DebugYamlFormHandler.php, line 30
Class
- DebugYamlFormHandler
- Form submission debug handler.
Namespace
Drupal\yamlform_devel\Plugin\YamlFormHandlerCode
public function submitForm(array &$form, FormStateInterface $form_state, YamlFormSubmissionInterface $yamlform_submission) {
$build = [
'#markup' => 'Submitted values are:<pre>' . Yaml::encode($yamlform_submission
->getData()) . '</pre>',
];
drupal_set_message(\Drupal::service('renderer')
->render($build), 'warning');
}