File tree Expand file tree Collapse file tree 2 files changed +10
-9
lines changed
app/code/Magento/ImportExport Expand file tree Collapse file tree 2 files changed +10
-9
lines changed Original file line number Diff line number Diff line change 2020 */
2121abstract class ImportResult extends Import
2222{
23+ public const IMPORT_HISTORY_FILE_DOWNLOAD_ROUTE = '*/history/download ' ;
24+
25+ /**
26+ * Limit view errors
27+ */
28+ public const LIMIT_ERRORS_MESSAGE = 100 ;
29+
2330 /**
2431 * @var ReportProcessorInterface
2532 */
Original file line number Diff line number Diff line change 1616use Magento \ImportExport \Model \Import \ErrorProcessing \ProcessingError ;
1717use Magento \ImportExport \Model \Import \ErrorProcessing \ProcessingErrorAggregatorInterface ;
1818use Magento \ImportExport \Model \Report \ReportProcessorInterface ;
19+ use Magento \ImportExport \Controller \Adminhtml \ImportResult ;
1920
2021/**
2122 * Import Render Error Messages Service model.
2223 */
2324class RenderErrorMessages
2425{
25- public const IMPORT_HISTORY_FILE_DOWNLOAD_ROUTE = '*/history/download ' ;
26-
27- /**
28- * Limit view errors
29- */
30- public const LIMIT_ERRORS_MESSAGE = 100 ;
31-
3226 /**
3327 * @var ReportProcessorInterface
3428 */
@@ -92,7 +86,7 @@ public function renderMessages(
9286 $ escapedMessages = [];
9387 foreach ($ this ->getErrorMessages ($ errorAggregator ) as $ error ) {
9488 $ escapedMessages [] = (++$ counter ) . '. ' . $ this ->escaper ->escapeHtml ($ error );
95- if ($ counter >= self ::LIMIT_ERRORS_MESSAGE ) {
89+ if ($ counter >= ImportResult ::LIMIT_ERRORS_MESSAGE ) {
9690 break ;
9791 }
9892 }
@@ -168,6 +162,6 @@ public function createErrorReport(ProcessingErrorAggregatorInterface $errorAggre
168162 */
169163 public function createDownloadUrlImportHistoryFile ($ fileName ): string
170164 {
171- return $ this ->backendUrl ->getUrl (self ::IMPORT_HISTORY_FILE_DOWNLOAD_ROUTE , ['filename ' => $ fileName ]);
165+ return $ this ->backendUrl ->getUrl (ImportResult ::IMPORT_HISTORY_FILE_DOWNLOAD_ROUTE , ['filename ' => $ fileName ]);
172166 }
173167}
You can’t perform that action at this time.
0 commit comments