1 config.inc public ConfigFileStorage::exportArchive($file_uri)

Export an archive of configuration files from the config storage managed by this object.

Parameters

string $file_uri: The URI of the tar archive file to create.

Return value

bool: TRUE on success, FALSE otherwise.

Throws

ConfigStorageException

Overrides ConfigStorageInterface::exportArchive

File

core/includes/config.inc, line 1842
This is the API for configuration storage.

Class

ConfigFileStorage
Defines the file storage controller.

Code

public function exportArchive($file_uri) {
  $archiver = new ArchiverTar($file_uri);
  $config_files = array();
  foreach ($this->listAll() as $config_name) {
    $config_files[] = $this->directory . '/' . $config_name . '.json';
  }
  $archiver->getArchive()->createModify($config_files, '', $this->directory);
}