You are here

protected function DrupalSiteArchiveSource::getManifestFile in Backup and Migrate 5.0.x

Get a file which contains the file.

Return value

\Drupal\backup_migrate\Core\File\BackupFileWritableInterface

1 call to DrupalSiteArchiveSource::getManifestFile()
DrupalSiteArchiveSource::getFilesToBackup in src/Drupal/Source/DrupalSiteArchiveSource.php
Get a list if files to be backed up from the given directory.

File

src/Drupal/Source/DrupalSiteArchiveSource.php, line 86

Class

DrupalSiteArchiveSource
@package Drupal\backup_migrate\Drupal\Source

Namespace

Drupal\backup_migrate\Drupal\Source

Code

protected function getManifestFile() {
  $out = $this
    ->getTempFileManager()
    ->create('ini');
  $info = [
    'Global' => [
      'datestamp' => \Drupal::time()
        ->getRequestTime(),
      "formatversion" => "2011-07-02",
      "generator" => "Backup and Migrate (http://drupal.org/project/backup_migrate)",
      "generatorversion" => backup_migrate_module_version(),
    ],
    'Site 0' => [
      'version' => \Drupal::VERSION,
      'name' => "Example.com",
      'docroot' => "docroot",
      'sitedir' => "docroot/sites/default",
      'database-file-default' => "database.sql",
      'database-file-driver' => "mysql",
      'files-private' => "docroot/sites/default/private",
      'files-public' => "docroot/sites/default/files",
    ],
  ];
  $out
    ->writeAll($this
    ->arrayToIni($info));
  return $out;
}