You are here

public function ConfigImportForm::buildForm in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 core/modules/config/src/Form/ConfigImportForm.php \Drupal\config\Form\ConfigImportForm::buildForm()

Form constructor.

Parameters

array $form: An associative array containing the structure of the form.

\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.

Return value

array The form structure.

Overrides FormInterface::buildForm

File

core/modules/config/src/Form/ConfigImportForm.php, line 57
Contains \Drupal\config\Form\ConfigImportForm.

Class

ConfigImportForm
Defines the configuration import form.

Namespace

Drupal\config\Form

Code

public function buildForm(array $form, FormStateInterface $form_state) {
  $form['import_tarball'] = array(
    '#type' => 'file',
    '#title' => $this
      ->t('Configuration archive'),
    '#description' => $this
      ->t('Allowed types: @extensions.', array(
      '@extensions' => 'tar.gz tgz tar.bz2',
    )),
  );
  $form['submit'] = array(
    '#type' => 'submit',
    '#value' => $this
      ->t('Upload'),
  );
  return $form;
}