Add accepted formats on import form and add delete not registred exports and imports
modifié: core/lib/Thelia/Config/Resources/export.xml modifié: core/lib/Thelia/Config/Resources/import.xml modifié: core/lib/Thelia/Controller/Admin/ImportExportController.php modifié: core/lib/Thelia/Core/DependencyInjection/Loader/XmlFileLoader.php modifié: core/lib/Thelia/Core/FileFormat/Archive/ArchiveBuilderManager.php modifié: core/lib/Thelia/Core/FileFormat/Formatting/FormatterManager.php modifié: core/lib/Thelia/Model/Export.php modifié: core/lib/Thelia/Model/Import.php modifié: templates/backOffice/default/ajax/import-modal.html modifié: templates/backOffice/default/import-page.html
This commit is contained in:
@@ -125,10 +125,10 @@ class Export extends BaseExport
|
||||
if (!$instance instanceof ExportHandler) {
|
||||
throw new \ErrorException(
|
||||
Translator::getInstance()->trans(
|
||||
"The class \"%class\" must implement %interface",
|
||||
"The class \"%class\" must extend %baseClass",
|
||||
[
|
||||
"%class" => $class,
|
||||
"%interface" => "\\Thelia\\ImportExport\\Export\\ExportHandler",
|
||||
"%baseClass" => "Thelia\\ImportExport\\Export\\ExportHandler",
|
||||
]
|
||||
)
|
||||
);
|
||||
|
||||
@@ -4,6 +4,7 @@ namespace Thelia\Model;
|
||||
|
||||
use Propel\Runtime\ActiveQuery\Criteria;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
use Thelia\Core\Translation\Translator;
|
||||
use Thelia\ImportExport\Import\ImportHandler;
|
||||
use Thelia\Model\Base\Import as BaseImport;
|
||||
use Thelia\Model\Map\ImportTableMap;
|
||||
@@ -97,22 +98,26 @@ class Import extends BaseImport
|
||||
|
||||
if (!class_exists($class)) {
|
||||
throw new \ErrorException(
|
||||
"The class \"%class\" doesn't exist",
|
||||
[
|
||||
"%class" => $class
|
||||
]
|
||||
Translator::getInstance()->trans(
|
||||
"The class \"%class\" doesn't exist",
|
||||
[
|
||||
"%class" => $class
|
||||
]
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
$instance = new $class($container);
|
||||
|
||||
if (!$class instanceof ImportHandler) {
|
||||
if (!$instance instanceof ImportHandler) {
|
||||
throw new \ErrorException(
|
||||
"The class \"%class\" must implement %interface",
|
||||
[
|
||||
"%class" => $class,
|
||||
"%interface" => "\\Thelia\\ImportExport\\Import\\ImportHandler",
|
||||
]
|
||||
Translator::getInstance()->trans(
|
||||
"The class \"%class\" must extend %baseClass",
|
||||
[
|
||||
"%class" => $class,
|
||||
"%baseClass" => "Thelia\\ImportExport\\Import\\ImportHandler",
|
||||
]
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user