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 20
20
*/
21
21
abstract class ImportResult extends Import
22
22
{
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
+
23
30
/**
24
31
* @var ReportProcessorInterface
25
32
*/
Original file line number Diff line number Diff line change 16
16
use Magento \ImportExport \Model \Import \ErrorProcessing \ProcessingError ;
17
17
use Magento \ImportExport \Model \Import \ErrorProcessing \ProcessingErrorAggregatorInterface ;
18
18
use Magento \ImportExport \Model \Report \ReportProcessorInterface ;
19
+ use Magento \ImportExport \Controller \Adminhtml \ImportResult ;
19
20
20
21
/**
21
22
* Import Render Error Messages Service model.
22
23
*/
23
24
class RenderErrorMessages
24
25
{
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
-
32
26
/**
33
27
* @var ReportProcessorInterface
34
28
*/
@@ -92,7 +86,7 @@ public function renderMessages(
92
86
$ escapedMessages = [];
93
87
foreach ($ this ->getErrorMessages ($ errorAggregator ) as $ error ) {
94
88
$ escapedMessages [] = (++$ counter ) . '. ' . $ this ->escaper ->escapeHtml ($ error );
95
- if ($ counter >= self ::LIMIT_ERRORS_MESSAGE ) {
89
+ if ($ counter >= ImportResult ::LIMIT_ERRORS_MESSAGE ) {
96
90
break ;
97
91
}
98
92
}
@@ -168,6 +162,6 @@ public function createErrorReport(ProcessingErrorAggregatorInterface $errorAggre
168
162
*/
169
163
public function createDownloadUrlImportHistoryFile ($ fileName ): string
170
164
{
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 ]);
172
166
}
173
167
}
You can’t perform that action at this time.
0 commit comments