Skip to content

Commit da8f5a4

Browse files
author
Yaroslav Onischenko
committed
Merge remote-tracking branch 'origin/MAGETWO-45201' into develop
2 parents 461ef0f + 71f0c36 commit da8f5a4

File tree

6 files changed

+34
-15
lines changed

6 files changed

+34
-15
lines changed

app/code/Magento/BundleSampleData/Model/Product.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,28 +18,33 @@ class Product extends \Magento\CatalogSampleData\Model\Product
1818
protected $productType = \Magento\Catalog\Model\Product\Type::TYPE_BUNDLE;
1919

2020
/**
21+
* Product constructor.
2122
* @param SampleDataContext $sampleDataContext
2223
* @param \Magento\Catalog\Model\ProductFactory $productFactory
2324
* @param \Magento\Catalog\Model\ConfigFactory $catalogConfig
2425
* @param Product\Converter $converter
2526
* @param \Magento\CatalogSampleData\Model\Product\Gallery $gallery
2627
* @param \Magento\Store\Model\StoreManagerInterface $storeManager
28+
* @param \Magento\Eav\Model\Config $eavConfig
2729
*/
2830
public function __construct(
2931
SampleDataContext $sampleDataContext,
3032
\Magento\Catalog\Model\ProductFactory $productFactory,
3133
\Magento\Catalog\Model\ConfigFactory $catalogConfig,
3234
\Magento\BundleSampleData\Model\Product\Converter $converter,
3335
\Magento\CatalogSampleData\Model\Product\Gallery $gallery,
34-
\Magento\Store\Model\StoreManagerInterface $storeManager
36+
\Magento\Store\Model\StoreManagerInterface $storeManager,
37+
\Magento\Eav\Model\Config $eavConfig
3538
) {
39+
$this->eavConfig = $eavConfig;
3640
parent::__construct(
3741
$sampleDataContext,
3842
$productFactory,
3943
$catalogConfig,
4044
$converter,
4145
$gallery,
42-
$storeManager
46+
$storeManager,
47+
$eavConfig
4348
);
4449
}
4550

app/code/Magento/CatalogSampleData/Model/Product.php

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,23 +60,28 @@ class Product
6060
protected $storeManager;
6161

6262
/**
63+
* @var \Magento\Eav\Model\Config
64+
*/
65+
protected $eavConfig;
66+
67+
/**
68+
* Product constructor.
6369
* @param SampleDataContext $sampleDataContext
6470
* @param \Magento\Catalog\Model\ProductFactory $productFactory
6571
* @param \Magento\Catalog\Model\ConfigFactory $catalogConfig
6672
* @param Product\Converter $converter
6773
* @param Product\Gallery $gallery
6874
* @param \Magento\Store\Model\StoreManagerInterface $storeManager
69-
*
70-
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
71-
* @codingStandardsIgnoreStart
75+
* @param \Magento\Eav\Model\Config $eavConfig
7276
*/
7377
public function __construct(
7478
SampleDataContext $sampleDataContext,
7579
\Magento\Catalog\Model\ProductFactory $productFactory,
7680
\Magento\Catalog\Model\ConfigFactory $catalogConfig,
7781
Product\Converter $converter,
7882
Product\Gallery $gallery,
79-
\Magento\Store\Model\StoreManagerInterface $storeManager
83+
\Magento\Store\Model\StoreManagerInterface $storeManager,
84+
\Magento\Eav\Model\Config $eavConfig
8085
) {
8186
$this->fixtureManager = $sampleDataContext->getFixtureManager();
8287
$this->productFactory = $productFactory;
@@ -85,8 +90,8 @@ public function __construct(
8590
$this->csvReader = $sampleDataContext->getCsvReader();
8691
$this->gallery = $gallery;
8792
$this->storeManager = $storeManager;
93+
$this->eavConfig = $eavConfig;
8894
}
89-
// @codingStandardsIgnoreEnd
9095

9196
/**
9297
* @param array $productFixtures
@@ -95,6 +100,7 @@ public function __construct(
95100
*/
96101
public function install(array $productFixtures, array $galleryFixtures)
97102
{
103+
$this->eavConfig->clear();
98104
$this->setGalleryFixtures($galleryFixtures);
99105

100106
$product = $this->productFactory->create();

app/code/Magento/ConfigurableSampleData/Model/Product.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ public function __construct(
6969
*/
7070
public function install()
7171
{
72+
$this->eavConfig->clear();
7273
$importModel = $this->importModel;
7374
$importModel->setData(
7475
[

app/code/Magento/ConfigurableSampleData/etc/module.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
<module name="Magento_SampleData"/>
1313
<module name="Magento_CatalogSampleData"/>
1414
<module name="Magento_DownloadableSampleData"/>
15+
<module name="Magento_BundleSampleData"/>
1516
</sequence>
1617
</module>
1718
</config>

app/code/Magento/DownloadableSampleData/Model/Product.php

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,29 +28,32 @@ class Product extends \Magento\CatalogSampleData\Model\Product
2828
protected $downloadableData = [];
2929

3030
/**
31+
* Product constructor.
3132
* @param SampleDataContext $sampleDataContext
3233
* @param \Magento\Catalog\Model\ProductFactory $productFactory
3334
* @param \Magento\Catalog\Model\ConfigFactory $catalogConfig
3435
* @param Product\Converter $converter
3536
* @param \Magento\CatalogSampleData\Model\Product\Gallery $gallery
3637
* @param \Magento\Store\Model\StoreManagerInterface $storeManager
38+
* @param \Magento\Eav\Model\Config $eavConfig
3739
*/
3840
public function __construct(
3941
SampleDataContext $sampleDataContext,
4042
\Magento\Catalog\Model\ProductFactory $productFactory,
4143
\Magento\Catalog\Model\ConfigFactory $catalogConfig,
4244
\Magento\DownloadableSampleData\Model\Product\Converter $converter,
4345
\Magento\CatalogSampleData\Model\Product\Gallery $gallery,
44-
\Magento\Store\Model\StoreManagerInterface $storeManager
45-
)
46-
{
46+
\Magento\Store\Model\StoreManagerInterface $storeManager,
47+
\Magento\Eav\Model\Config $eavConfig
48+
) {
4749
parent::__construct(
4850
$sampleDataContext,
4951
$productFactory,
5052
$catalogConfig,
5153
$converter,
5254
$gallery,
53-
$storeManager
55+
$storeManager,
56+
$eavConfig
5457
);
5558
}
5659

app/code/Magento/GroupedProductSampleData/Model/Product.php

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,15 @@ class Product extends \Magento\CatalogSampleData\Model\Product
1818
protected $productType = \Magento\GroupedProduct\Model\Product\Type\Grouped::TYPE_CODE;
1919

2020
/**
21+
* Product constructor.
2122
* @param SampleDataContext $sampleDataContext
2223
* @param \Magento\Catalog\Model\ProductFactory $productFactory
2324
* @param \Magento\Catalog\Model\ConfigFactory $catalogConfig
2425
* @param \Magento\GroupedProductSampleData\Model\Product\Converter $converter
2526
* @param \Magento\Framework\Setup\SampleData\FixtureManager $fixtureManager
2627
* @param \Magento\CatalogSampleData\Model\Product\Gallery $gallery
2728
* @param \Magento\Store\Model\StoreManagerInterface $storeManager
29+
* @param \Magento\Eav\Model\Config $eavConfig
2830
*/
2931
public function __construct(
3032
SampleDataContext $sampleDataContext,
@@ -33,16 +35,17 @@ public function __construct(
3335
\Magento\GroupedProductSampleData\Model\Product\Converter $converter,
3436
\Magento\Framework\Setup\SampleData\FixtureManager $fixtureManager,
3537
\Magento\CatalogSampleData\Model\Product\Gallery $gallery,
36-
\Magento\Store\Model\StoreManagerInterface $storeManager
37-
)
38-
{
38+
\Magento\Store\Model\StoreManagerInterface $storeManager,
39+
\Magento\Eav\Model\Config $eavConfig
40+
) {
3941
parent::__construct(
4042
$sampleDataContext,
4143
$productFactory,
4244
$catalogConfig,
4345
$converter,
4446
$gallery,
45-
$storeManager
47+
$storeManager,
48+
$eavConfig
4649
);
4750
}
4851
}

0 commit comments

Comments
 (0)