' . t('About') . ''; $output .= '
' . t('The Configuration Manager module provides a user interface for importing and exporting configuration changes between installations of your website in different environments. Configuration is stored in YAML format. For more information, see the online documentation for the Configuration Manager module.', array('!url' => 'https://www.drupal.org/documentation/administer/config')) . '
'; $output .= '' . t('Import configuration that is placed in your staging directory. All changes, deletions, renames, and additions are listed below.') . '
'; return $output; case 'config.export_full': $output = ''; $output .= '' . t('The full export page can be used to export the full configuration of this site, and download it as a gzipped tar file.') . '
'; return $output; case 'config.import_full': $output = ''; $output .= '' . t('The full import page can be used to import a full set of configuration for this site by uploading a gzipped or bzipped tar file consisting of all configuration YAML files. The results will be placed in a the staging directory, so they can be compared in the Synchronize tab. There the import can be finalized.') . '
'; return $output; case 'config.export_single': $output = ''; $output .= '' . t('The single export page can be used to display a single configuration item in a YAML structure.') . '
'; return $output; case 'config.import_single': $output = ''; $output .= '' . t('The single import page can be used to import a single configuration item by pasting a YAML structure into the text field.') . '
'; return $output; } } /** * Implements hook_file_download(). */ function config_file_download($uri) { $scheme = file_uri_scheme($uri); $target = file_uri_target($uri); if ($scheme == 'temporary' && $target == 'config.tar.gz') { $request = \Drupal::request(); $date = DateTime::createFromFormat('U', $request->server->get('REQUEST_TIME')); $date_string = $date->format('Y-m-d-H-i'); $hostname = str_replace('.', '-', $request->getHttpHost()); $filename = 'config' . '-' . $hostname . '-' . $date_string. '.tar.gz'; $disposition = 'attachment; filename="' . $filename . '"'; return array( 'Content-disposition' => $disposition, ); } }