ConfigExportForm.php

Same filename in other branches
  1. 8.9.x core/modules/config/src/Form/ConfigExportForm.php
  2. 10 core/modules/config/src/Form/ConfigExportForm.php
  3. 11.x core/modules/config/src/Form/ConfigExportForm.php

Namespace

Drupal\config\Form

File

core/modules/config/src/Form/ConfigExportForm.php

View source
<?php

namespace Drupal\config\Form;

use Drupal\Core\Form\FormBase;
use Drupal\Core\Form\FormStateInterface;

/**
 * Defines the configuration export form.
 *
 * @internal
 */
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');
    }

}

Classes

Title Deprecated Summary
ConfigExportForm Defines the configuration export form.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.