1.20.x config.admin.inc | config_import_full_form(array $form, array &$form_state) |
Form callback; Provide a form for importing a full set of configuration.
File
- modules/
config/ config.admin.inc, line 215 - Admin page callbacks for the Configuration Management module.
Code
function config_import_full_form(array $form, array &$form_state) {
$form['description'] = array(
'#markup' => '<p>' . t('This form imports a site configuration archive from another site. Upload an export file below to stage the changes (you\'ll have a chance to review and confirm the changes first). To generate an export file, visit the <a href="!export">full export</a> page.', array('!export' => url('admin/config/development/configuration/full/export'))) . '</p>',
);
$form['import_tarball'] = array(
'#type' => 'managed_file',
'#title' => t('Select your configuration export archive'),
'#description' => t('This file should be a compressed archive with the extension "tar.gz".'),
'#upload_validators' => array(
'file_validate_extensions' => array('tar gz'),
),
'#progress_indicator' => 'bar',
'#upload_location' => 'temporary://',
);
$form['actions']['#type'] = 'actions';
$form['actions']['submit'] = array(
'#type' => 'submit',
'#value' => t('Stage import'),
);
return $form;
}