public function BackupDatabaseFileHandler::setupFile in Backup Database 8
Handles file generation.
Parameters
$config:
File
- src/
BackupDatabaseFileHandler.php, line 50 - Contains \Drupal\backup_db\BackupDatabaseFileHandler
Class
- BackupDatabaseFileHandler
- BackupDatabaseFileHandler class.
Namespace
Drupal\backup_dbCode
public function setupFile($config) {
$this
->setConfig($config);
$path = $this
->createFilePath();
$extension = $this
->createFileType();
$this->file
->setFileName($this->config['name'] . '_' . time() . $extension);
$this->file
->setFileUri(file_create_filename($this->file
->getFileName(), $path));
}