1 config.admin.inc config_import_single_form(array $form, array &$form_state)

Form callback; Build the form to import a single configuration file.

File

core/modules/config/config.admin.inc, line 408
Admin page callbacks for the Configuration Management module.

Code

function config_import_single_form(array $form, array &$form_state) {
  form_load_include($form_state, 'inc', 'config', 'config.sync');
  $form['#attached']['css'][] = backdrop_get_path('module', 'config') . '/css/config.admin.css';

  $form['description'] = array(
    '#type' => 'help',
    '#markup' => t('This form imports a single configuration file from another site. To generate an export, visit the <a href="!export">single export</a> page.', array('!export' => url('admin/config/development/configuration/single/export'))),
  );
  $form['import'] = array(
    '#title' => t('Paste your configuration here'),
    '#type' => 'textarea',
    '#rows' => 12,
    '#required' => TRUE,
  );
  $form['actions'] = array('#type' => 'actions');
  $form['actions']['submit'] = array(
    '#type' => 'submit',
    '#value' => t('Import'),
  );
  return $form;
}