7 declare(strict_types=1);
48 \
Magento\Framework\AuthorizationInterface $authorization,
51 parent::__construct($context);
52 $this->_authorization = $authorization;
94 return \Magento\Framework\Backup\Factory::TYPE_DB;
116 return $extensions[
$type] ??
'';
143 return $backup->getTime() .
148 $additionalExtension .
162 return $this->_authorization->isAllowed(
'Magento_Backup::rollback');
218 'You created the system backup (excluding media).' 224 if (!isset($messagesMap[
$type])) {
228 return $messagesMap[
$type];
238 if ($cacheTypes = $this->_cacheConfig->getTypes()) {
239 $cacheTypesList = array_keys($cacheTypes);
240 $this->_cacheTypeList->invalidate($cacheTypesList);
253 return str_replace(
'_',
' ',
$name);
266 $filenameWithoutExtension = $filename;
269 $filenameWithoutExtension = preg_replace(
272 $filenameWithoutExtension
276 $filenameWithoutExtension = substr($filenameWithoutExtension, 0, strrpos($filenameWithoutExtension,
"."));
278 list($time,
$type) = explode(
"_", $filenameWithoutExtension);
280 $name = str_replace($time .
'_' .
$type,
'', $filenameWithoutExtension);
286 $result = new \Magento\Framework\DataObject();
299 return $this->scopeConfig->isSetFlag(
'system/backup/functionality_enabled');
const TYPE_SNAPSHOT_WITHOUT_MEDIA
extractDataFromFilename($filename)
getCreateSuccessMessageByType($type)
generateBackupDownloadName(\Magento\Backup\Model\Backup $backup)
const TYPE_SYSTEM_SNAPSHOT
__construct(\Magento\Framework\App\Helper\Context $context, Filesystem $filesystem, \Magento\Framework\AuthorizationInterface $authorization, \Magento\Framework\App\Cache\TypeListInterface $cacheTypeList)
getExtensionByType($type)
if(!isset($_GET['name'])) $name