File tree Expand file tree Collapse file tree 4 files changed +22
-46
lines changed
CatalogImportExport/Model/Import
lib/internal/Magento/Framework/Setup/SampleData Expand file tree Collapse file tree 4 files changed +22
-46
lines changed Original file line number Diff line number Diff line change @@ -1803,7 +1803,7 @@ protected function _saveMediaGallery(array $mediaGalleryData)
1803
1803
'value ' => $ insertValue ['value ' ],
1804
1804
];
1805
1805
$ valueToProductId [$ insertValue ['value ' ]] = $ productId ;
1806
- $ imageNames = $ insertValue ['value ' ];
1806
+ $ imageNames[] = $ insertValue ['value ' ];
1807
1807
$ multiInsertData [] = $ valueArr ;
1808
1808
$ insertedGalleryImgs [] = $ insertValue ['value ' ];
1809
1809
}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 15
15
</argument >
16
16
</arguments >
17
17
</type >
18
- <virtualType name =" Magento\SampleData\Model\BlackHoleFactory" type =" \Magento\Framework\Mail\TransportInterfaceFactory" >
19
- <arguments >
20
- <argument name =" instanceName" xsi : type =" string" >Magento\SampleData\Model\BlackHole</argument >
21
- </arguments >
22
- </virtualType >
23
- <virtualType name =" blackHoleTransportBuilder" type =" Magento\Framework\Mail\Template\TransportBuilder" >
24
- <arguments >
25
- <argument name =" mailTransportFactory" xsi : type =" object" >Magento\SampleData\Model\BlackHoleFactory</argument >
26
- </arguments >
27
- </virtualType >
28
- <virtualType name =" sampleDataAccountManagement" type =" Magento\Customer\Model\AccountManagement" >
29
- <arguments >
30
- <argument name =" transportBuilder" xsi : type =" object" >blackHoleTransportBuilder</argument >
31
- </arguments >
32
- </virtualType >
33
- <type name =" Magento\SampleData\Module\Customer\Setup\Customer" >
34
- <arguments >
35
- <argument name =" accountManagement" xsi : type =" object" >sampleDataAccountManagement</argument >
36
- </arguments >
37
- </type >
38
18
</config >
Original file line number Diff line number Diff line change 7
7
8
8
class Executor
9
9
{
10
+ /**
11
+ * @var State
12
+ */
13
+ private $ state ;
14
+
15
+ /**
16
+ * @var \Psr\Log\LoggerInterface
17
+ */
18
+ private $ logger ;
19
+
20
+ /**
21
+ * @var \Magento\Framework\App\State
22
+ */
23
+ private $ appState ;
24
+
10
25
/**
11
26
* @param \Psr\Log\LoggerInterface $logger
12
- * @param \Magento\Framework\Setup\SampleData\State $state
27
+ * @param State $state
28
+ * @param \Magento\Framework\App\State $appState
13
29
*/
14
30
public function __construct (
15
31
\Psr \Log \LoggerInterface $ logger ,
16
- \Magento \Framework \Setup \SampleData \State $ state
32
+ \Magento \Framework \Setup \SampleData \State $ state ,
33
+ \Magento \Framework \App \State $ appState
17
34
) {
18
35
$ this ->logger = $ logger ;
19
36
$ this ->state = $ state ;
37
+ $ this ->appState = $ appState ;
20
38
}
21
39
22
40
/**
@@ -29,7 +47,7 @@ public function __construct(
29
47
public function exec (InstallerInterface $ installer )
30
48
{
31
49
try {
32
- $ installer -> install ( );
50
+ $ this -> appState -> emulateAreaCode ( ' setup ' , [ $ installer , ' install ' ] );
33
51
$ this ->state ->setInstalled ();
34
52
} catch (\Exception $ e ) {
35
53
$ this ->state ->setError ();
You can’t perform that action at this time.
0 commit comments