Version 1
[yaffs-website] / web / core / modules / config / src / Form / ConfigExportForm.php
1 <?php
2
3 namespace Drupal\config\Form;
4
5 use Drupal\Core\Form\FormBase;
6 use Drupal\Core\Form\FormStateInterface;
7
8 /**
9  * Defines the configuration export form.
10  */
11 class ConfigExportForm extends FormBase {
12
13   /**
14    * {@inheritdoc}
15    */
16   public function getFormId() {
17     return 'config_export_form';
18   }
19
20   /**
21    * {@inheritdoc}
22    */
23   public function buildForm(array $form, FormStateInterface $form_state) {
24     $form['submit'] = [
25       '#type' => 'submit',
26       '#value' => $this->t('Export'),
27     ];
28     return $form;
29   }
30
31   /**
32    * {@inheritdoc}
33    */
34   public function submitForm(array &$form, FormStateInterface $form_state) {
35     $form_state->setRedirect('config.export_download');
36   }
37
38 }