Version 1
[yaffs-website] / web / core / modules / config / src / Form / ConfigExportForm.php
diff --git a/web/core/modules/config/src/Form/ConfigExportForm.php b/web/core/modules/config/src/Form/ConfigExportForm.php
new file mode 100644 (file)
index 0000000..e822f7f
--- /dev/null
@@ -0,0 +1,38 @@
+<?php
+
+namespace Drupal\config\Form;
+
+use Drupal\Core\Form\FormBase;
+use Drupal\Core\Form\FormStateInterface;
+
+/**
+ * Defines the configuration export form.
+ */
+class ConfigExportForm extends FormBase {
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getFormId() {
+    return 'config_export_form';
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function buildForm(array $form, FormStateInterface $form_state) {
+    $form['submit'] = [
+      '#type' => 'submit',
+      '#value' => $this->t('Export'),
+    ];
+    return $form;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function submitForm(array &$form, FormStateInterface $form_state) {
+    $form_state->setRedirect('config.export_download');
+  }
+
+}