You are here

public function ConfigImporterService::exportConfigs in Config Importer and Tools 8

Same name and namespace in other branches
  1. 8.2 src/ConfigImporterService.php \Drupal\config_import\ConfigImporterService::exportConfigs()

Export configurations.

Parameters

string[] $configs: Configurations to export.

Overrides ConfigImporterServiceInterface::exportConfigs

File

src/ConfigImporterService.php, line 257

Class

ConfigImporterService
Class ConfigImporterService.

Namespace

Drupal\config_import

Code

public function exportConfigs(array $configs) {
  $storage = new FileStorage($this->directory);
  foreach ($configs as $config) {
    $storage
      ->write($config, $this->configStorage
      ->read($config));
  }
}