File tree Expand file tree Collapse file tree 7 files changed +43
-29
lines changed
app/code/Magento/ImportExport Expand file tree Collapse file tree 7 files changed +43
-29
lines changed Original file line number Diff line number Diff line change @@ -17,30 +17,15 @@ interface ExtendedExportInfoInterface extends ExportInfoInterface
17
17
/**
18
18
* Returns skipped attributes
19
19
*
20
- * @return string[]|null
20
+ * @return mixed
21
21
*/
22
- public function getSkipAttr (): ? array ;
22
+ public function getSkipAttr ();
23
23
24
24
/**
25
25
* Set skipped attributes
26
26
*
27
- * @param string[] $skipAttr
28
- * @return void
27
+ * @param string $skipAttr
28
+ * @return mixed
29
29
*/
30
- public function setSkipAttr (array $ skipAttr ): void ;
31
-
32
- /**
33
- * Returns admin locale
34
- *
35
- * @return string|null
36
- */
37
- public function getLocale (): ?string ;
38
-
39
- /**
40
- * Set admin locale
41
- *
42
- * @param string $locale
43
- * @return void
44
- */
45
- public function setLocale (string $ locale ): void ;
30
+ public function setSkipAttr ($ skipAttr );
46
31
}
Original file line number Diff line number Diff line change
1
+ <?php
2
+ /**
3
+ * Copyright © Magento, Inc. All rights reserved.
4
+ * See COPYING.txt for license details.
5
+ */
6
+ declare (strict_types=1 );
7
+
8
+ namespace Magento \ImportExport \Api \Data ;
9
+
10
+ /**
11
+ * Localized export interface for correct parsing values (like date) provided in admin ui locale.
12
+ */
13
+ interface LocalizedExportInfoInterface extends ExtendedExportInfoInterface
14
+ {
15
+ /**
16
+ * Returns admin locale
17
+ *
18
+ * @return string|null
19
+ */
20
+ public function getLocale (): ?string ;
21
+
22
+ /**
23
+ * Set admin locale
24
+ *
25
+ * @param string $locale
26
+ * @return void
27
+ */
28
+ public function setLocale (string $ locale ): void ;
29
+ }
Original file line number Diff line number Diff line change 12
12
use Magento \Framework \Exception \LocalizedException ;
13
13
use Magento \Framework \Filesystem ;
14
14
use Magento \Framework \Locale \ResolverInterface ;
15
- use Magento \ImportExport \Api \Data \ExtendedExportInfoInterface ;
15
+ use Magento \ImportExport \Api \Data \LocalizedExportInfoInterface ;
16
16
use Magento \ImportExport \Api \ExportManagementInterface ;
17
17
use Magento \Framework \Notification \NotifierInterface ;
18
18
@@ -71,10 +71,10 @@ public function __construct(
71
71
/**
72
72
* Consumer logic.
73
73
*
74
- * @param ExtendedExportInfoInterface $exportInfo
74
+ * @param LocalizedExportInfoInterface $exportInfo
75
75
* @return void
76
76
*/
77
- public function process (ExtendedExportInfoInterface $ exportInfo )
77
+ public function process (LocalizedExportInfoInterface $ exportInfo )
78
78
{
79
79
$ currentLocale = $ this ->localeResolver ->getLocale ();
80
80
if ($ exportInfo ->getLocale ()) {
Original file line number Diff line number Diff line change 7
7
8
8
namespace Magento \ImportExport \Model \Export \Entity ;
9
9
10
- use Magento \ImportExport \Api \Data \ExtendedExportInfoInterface ;
10
+ use Magento \ImportExport \Api \Data \LocalizedExportInfoInterface ;
11
11
12
12
/**
13
13
* Class ExportInfo implementation for ExportInfoInterface.
14
14
*/
15
- class ExportInfo implements ExtendedExportInfoInterface
15
+ class ExportInfo implements LocalizedExportInfoInterface
16
16
{
17
17
/**
18
18
* @var string
Original file line number Diff line number Diff line change 12
12
use Magento \Framework \Filesystem \Directory \WriteInterface ;
13
13
use Magento \Framework \Locale \ResolverInterface ;
14
14
use Magento \Framework \Notification \NotifierInterface ;
15
- use Magento \ImportExport \Api \Data \ExtendedExportInfoInterface ;
15
+ use Magento \ImportExport \Api \Data \LocalizedExportInfoInterface ;
16
16
use Magento \ImportExport \Api \ExportManagementInterface ;
17
17
use Magento \ImportExport \Model \Export \Consumer ;
18
18
use PHPUnit \Framework \MockObject \MockObject ;
@@ -70,7 +70,7 @@ protected function setUp(): void
70
70
public function testProcess ()
71
71
{
72
72
$ adminLocale = 'de_DE ' ;
73
- $ exportInfoMock = $ this ->createMock (ExtendedExportInfoInterface ::class);
73
+ $ exportInfoMock = $ this ->createMock (LocalizedExportInfoInterface ::class);
74
74
$ exportInfoMock ->expects ($ this ->atLeastOnce ())
75
75
->method ('getLocale ' )
76
76
->willReturn ($ adminLocale );
Original file line number Diff line number Diff line change 6
6
*/
7
7
-->
8
8
<config xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : noNamespaceSchemaLocation =" urn:magento:framework:Communication/etc/communication.xsd" >
9
- <topic name =" import_export.export" request =" Magento\ImportExport\Api\Data\ExtendedExportInfoInterface " >
9
+ <topic name =" import_export.export" request =" Magento\ImportExport\Api\Data\LocalizedExportInfoInterface " >
10
10
<handler name =" exportProcessor" type =" Magento\ImportExport\Model\Export\Consumer" method =" process" />
11
11
</topic >
12
12
</config >
Original file line number Diff line number Diff line change 11
11
<preference for =" Magento\ImportExport\Model\Import\ErrorProcessing\ProcessingErrorAggregatorInterface" type =" Magento\ImportExport\Model\Import\ErrorProcessing\ProcessingErrorAggregator" />
12
12
<preference for =" Magento\ImportExport\Model\Report\ReportProcessorInterface" type =" Magento\ImportExport\Model\Report\Csv" />
13
13
<preference for =" Magento\ImportExport\Api\Data\ExportInfoInterface" type =" Magento\ImportExport\Model\Export\Entity\ExportInfo" />
14
- <preference for =" Magento\ImportExport\Api\Data\ExtendedExportInfoInterface " type =" Magento\ImportExport\Model\Export\Entity\ExportInfo" />
14
+ <preference for =" Magento\ImportExport\Api\Data\LocalizedExportInfoInterface " type =" Magento\ImportExport\Model\Export\Entity\ExportInfo" />
15
15
<preference for =" Magento\ImportExport\Api\ExportManagementInterface" type =" Magento\ImportExport\Model\Export\ExportManagement" />
16
16
<type name =" Magento\Framework\Module\Setup\Migration" >
17
17
<arguments >
You can’t perform that action at this time.
0 commit comments