public function WebformEntityExportForm::form in Webform 6.x
Same name and namespace in other branches
- 8.5 src/WebformEntityExportForm.php \Drupal\webform\WebformEntityExportForm::form()
Gets the actual form array to be built.
Overrides EntityForm::form
See also
\Drupal\Core\Entity\EntityForm::processForm()
\Drupal\Core\Entity\EntityForm::afterBuild()
File
- src/
WebformEntityExportForm.php, line 18
Class
- WebformEntityExportForm
- Export webform configuration.
Namespace
Drupal\webformCode
public function form(array $form, FormStateInterface $form_state) {
$form['yaml'] = [
'#type' => 'webform_codemirror',
'#mode' => 'yaml',
'#title' => $this
->t("Here is your webform's configuration:"),
'#description' => $this
->t('Filename: %file', [
'%file' => $this
->getConfigName() . '.yml',
]),
'#default_value' => $this
->getYaml(),
];
return $form;
}