- Extract the complete import logic (label-scan reading, page find-or-create, slot filling, content-idempotent image attach) from ImportSubmarketWorkbooksCommand into the shared service SubmarketWorkbookImporter; the CLI command and the new controller are thin shells around importFile(), so both entry points cannot drift. CLI regression verified: identical dry-run report for the reference workbook (12 elements, page 443) - New "Sub-Markets" tab in the VITEC Import module (SubmarketImportController + Import/Submarkets.html): upload multiple filled workbooks into the SAME inbox the CLI uses (migrations/submarkets_xlsx_in/), per-file checkboxes, dry-run and apply buttons, result cards with the familiar report and a direct link into the page module; backend dry-run verified against the CLI - Submitted filenames are whitelisted against the actual directory listing (no path traversal); uploads restricted to sanitized .xlsx basenames - Routes submarkets/submarket_upload/submarket_process in Modules.php, Sub-Markets tab link in the sibling module views, ok/danger badge colors in backend-import.css - Docs section 5y (incl. operations note: apply in small batches in the module, mass runs via CLI - image downloads run inside the web request)
119 lines
4.5 KiB
PHP
119 lines
4.5 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
use Evomedien\Vitec\Controller\Backend\ImportController;
|
|
use Evomedien\Vitec\Controller\Backend\ProductTextImportController;
|
|
use Evomedien\Vitec\Controller\Backend\SubmarketImportController;
|
|
use Evomedien\Vitec\Controller\Backend\WordPressImportController;
|
|
use Evomedien\Vitec\Controller\OgImageController;
|
|
|
|
return [
|
|
'web_vitecimport' => [
|
|
'parent' => 'web',
|
|
'position' => ['after' => 'web_info'],
|
|
'access' => 'user',
|
|
'workspaces' => 'live',
|
|
'path' => '/module/web/vitec-import',
|
|
'labels' => [
|
|
'title' => 'VITEC Import',
|
|
'shortDescription' => 'CSV import for the VITEC domain models',
|
|
],
|
|
'extensionName' => 'Vitec',
|
|
'iconIdentifier' => 'vitec-import',
|
|
'routes' => [
|
|
'_default' => [
|
|
'target' => ImportController::class . '::indexAction',
|
|
],
|
|
'process' => [
|
|
'target' => ImportController::class . '::processAction',
|
|
'methods' => ['POST'],
|
|
],
|
|
'seo' => [
|
|
'target' => ImportController::class . '::seoAction',
|
|
],
|
|
'seo_upload' => [
|
|
'target' => ImportController::class . '::seoUploadAction',
|
|
'methods' => ['POST'],
|
|
],
|
|
'seo_aliases' => [
|
|
'target' => ImportController::class . '::seoAliasesAction',
|
|
'methods' => ['POST'],
|
|
],
|
|
'products' => [
|
|
'target' => ProductTextImportController::class . '::productsAction',
|
|
],
|
|
'product_edit' => [
|
|
'target' => ProductTextImportController::class . '::productEditAction',
|
|
],
|
|
'product_preview' => [
|
|
'target' => ProductTextImportController::class . '::productPreviewAction',
|
|
'methods' => ['POST'],
|
|
],
|
|
'product_apply' => [
|
|
'target' => ProductTextImportController::class . '::productApplyAction',
|
|
'methods' => ['POST'],
|
|
],
|
|
'submarkets' => [
|
|
'target' => SubmarketImportController::class . '::submarketsAction',
|
|
],
|
|
'submarket_upload' => [
|
|
'target' => SubmarketImportController::class . '::submarketUploadAction',
|
|
'methods' => ['POST'],
|
|
],
|
|
'submarket_process' => [
|
|
'target' => SubmarketImportController::class . '::submarketProcessAction',
|
|
'methods' => ['POST'],
|
|
],
|
|
],
|
|
],
|
|
'web_vitecwpimport' => [
|
|
'parent' => 'web',
|
|
'position' => ['after' => 'web_vitecimport'],
|
|
'access' => 'user',
|
|
'workspaces' => 'live',
|
|
'path' => '/module/web/vitec-wp-import',
|
|
'labels' => [
|
|
'title' => 'WordPress Import',
|
|
'shortDescription' => 'Imports WordPress blog posts as news records',
|
|
],
|
|
'extensionName' => 'Vitec',
|
|
'iconIdentifier' => 'vitec-wpimport',
|
|
'routes' => [
|
|
'_default' => [
|
|
'target' => WordPressImportController::class . '::indexAction',
|
|
],
|
|
'import' => [
|
|
'target' => WordPressImportController::class . '::importAction',
|
|
'methods' => ['POST'],
|
|
],
|
|
],
|
|
],
|
|
'web_vitecogimage' => [
|
|
'parent' => 'web',
|
|
'position' => ['after' => 'web_info'],
|
|
'access' => 'user',
|
|
'workspaces' => 'live',
|
|
'path' => '/module/web/vitec-ogimage',
|
|
'labels' => [
|
|
'title' => 'LLL:EXT:vitec/Resources/Private/Language/locallang_ogimage.xlf:mlang_tabs_tab',
|
|
'shortDescription' => 'LLL:EXT:vitec/Resources/Private/Language/locallang_ogimage.xlf:mlang_labels_tabdescr',
|
|
],
|
|
'extensionName' => 'Vitec',
|
|
'iconIdentifier' => 'vitec-ogimage',
|
|
'routes' => [
|
|
'_default' => [
|
|
'target' => OgImageController::class . '::indexAction',
|
|
],
|
|
'generate' => [
|
|
'target' => OgImageController::class . '::generateAction',
|
|
'methods' => ['POST'],
|
|
],
|
|
'preview' => [
|
|
'target' => OgImageController::class . '::previewAction',
|
|
'methods' => ['POST'],
|
|
],
|
|
],
|
|
],
|
|
];
|