public function DrupalEncrypt::beforeRestore in Backup and Migrate 5.0.x
File
- src/
Drupal/ Filter/ DrupalEncrypt.php, line 108
Class
- DrupalEncrypt
- @package Drupal\backup_migrate\Drupal\Filter
Namespace
Drupal\backup_migrate\Drupal\FilterCode
public function beforeRestore(BackupFileReadableInterface $file) {
$type = $file
->getExtLast();
if ($type == 'ssl' && $this
->confGet('encrypt')) {
$out = $this
->getTempFileManager()
->popExt($file);
$success = $this
->decryptFile($file, $out);
if ($out && $success) {
return $out;
}
}
return $file;
}