Skip to content

Commit 3879f1b

Browse files
committed
MAGETWO-87551: Convert existing data install/upgrade scripts
- SampleData CE modules
1 parent c7a1067 commit 3879f1b

File tree

38 files changed

+1387
-666
lines changed

38 files changed

+1387
-666
lines changed

app/code/Magento/BundleSampleData/Setup/InstallData.php

Lines changed: 0 additions & 36 deletions
This file was deleted.
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
7+
namespace Magento\BundleSampleData\Setup\Patch\Data;
8+
9+
use Magento\Framework\Setup;
10+
use Magento\Setup\Model\Patch\DataPatchInterface;
11+
use Magento\Setup\Model\Patch\PatchVersionInterface;
12+
13+
/**
14+
* Class InstallBundleSampleData
15+
* @package Magento\BundleSampleData\Setup\Patch\Data
16+
*/
17+
class InstallBundleSampleData implements DataPatchInterface, PatchVersionInterface
18+
{
19+
/**
20+
* @var Setup\SampleData\Executor
21+
*/
22+
protected $executor;
23+
24+
/**
25+
* @var \Magento\BundleSampleData\Setup\Installer
26+
*/
27+
protected $installer;
28+
29+
/**
30+
* InstallBundleSampleData constructor.
31+
* @param Setup\SampleData\Executor $executor
32+
* @param \Magento\BundleSampleData\Setup\Installer $installer
33+
*/
34+
public function __construct(
35+
Setup\SampleData\Executor $executor,
36+
\Magento\BundleSampleData\Setup\Installer $installer
37+
) {
38+
$this->executor = $executor;
39+
$this->installer = $installer;
40+
}
41+
42+
/**
43+
* {@inheritdoc}
44+
*/
45+
public function apply()
46+
{
47+
$this->executor->exec($this->installer);
48+
}
49+
50+
/**
51+
* {@inheritdoc}
52+
*/
53+
public static function getDependencies()
54+
{
55+
return [];
56+
}
57+
58+
/**
59+
* {@inheritdoc}
60+
*/
61+
public static function getVersion()
62+
{
63+
return '2.0.0';
64+
}
65+
66+
/**
67+
* {@inheritdoc}
68+
*/
69+
public function getAliases()
70+
{
71+
return [];
72+
}
73+
}

app/code/Magento/CatalogRuleSampleData/Setup/InstallData.php

Lines changed: 0 additions & 35 deletions
This file was deleted.
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
7+
namespace Magento\CatalogRuleSampleData\Setup\Patch\Data;
8+
9+
use Magento\Framework\Setup;
10+
use Magento\Setup\Model\Patch\DataPatchInterface;
11+
use Magento\Setup\Model\Patch\PatchVersionInterface;
12+
13+
/**
14+
* Class InstallCatalogRuleSampleData
15+
* @package Magento\CatalogRuleSampleData\Setup\Patch\Data
16+
*/
17+
class InstallCatalogRuleSampleData implements DataPatchInterface, PatchVersionInterface
18+
{
19+
/**
20+
* @var Setup\SampleData\Executor
21+
*/
22+
protected $executor;
23+
24+
/**
25+
* @var \Magento\CatalogRuleSampleData\Setup\Installer
26+
*/
27+
protected $installer;
28+
29+
/**
30+
* InstallCatalogRuleSampleData constructor.
31+
* @param Setup\SampleData\Executor $executor
32+
* @param \Magento\CatalogRuleSampleData\Setup\Installer $installer
33+
*/
34+
public function __construct(
35+
Setup\SampleData\Executor $executor,
36+
\Magento\CatalogRuleSampleData\Setup\Installer $installer
37+
) {
38+
$this->executor = $executor;
39+
$this->installer = $installer;
40+
}
41+
42+
/**
43+
* {@inheritdoc}
44+
*/
45+
public function apply()
46+
{
47+
$this->executor->exec($this->installer);
48+
}
49+
50+
/**
51+
* {@inheritdoc}
52+
*/
53+
public static function getDependencies()
54+
{
55+
return [];
56+
}
57+
58+
/**
59+
* {@inheritdoc}
60+
*/
61+
public static function getVersion()
62+
{
63+
return '2.0.0';
64+
}
65+
66+
/**
67+
* {@inheritdoc}
68+
*/
69+
public function getAliases()
70+
{
71+
return [];
72+
}
73+
}

app/code/Magento/CatalogSampleData/Setup/InstallData.php

Lines changed: 0 additions & 35 deletions
This file was deleted.
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
7+
namespace Magento\CatalogSampleData\Setup\Patch\Data;
8+
9+
use Magento\Framework\Setup;
10+
use Magento\Setup\Model\Patch\DataPatchInterface;
11+
use Magento\Setup\Model\Patch\PatchVersionInterface;
12+
13+
/**
14+
* Class InstallCatalogSampleData
15+
* @package Magento\CatalogSampleData\Setup\Patch\Data
16+
*/
17+
class InstallCatalogSampleData implements DataPatchInterface, PatchVersionInterface
18+
{
19+
/**
20+
* @var Setup\SampleData\Executor
21+
*/
22+
protected $executor;
23+
24+
/**
25+
* @var \Magento\CatalogSampleData\Setup\Installer
26+
*/
27+
protected $installer;
28+
29+
/**
30+
* InstallCatalogSampleData constructor.
31+
* @param Setup\SampleData\Executor $executor
32+
* @param \Magento\CatalogSampleData\Setup\Installer $installer
33+
*/
34+
public function __construct(
35+
Setup\SampleData\Executor $executor,
36+
\Magento\CatalogSampleData\Setup\Installer $installer
37+
) {
38+
$this->executor = $executor;
39+
$this->installer = $installer;
40+
}
41+
42+
/**
43+
* {@inheritdoc}
44+
*/
45+
public function apply()
46+
{
47+
$this->executor->exec($this->installer);
48+
}
49+
50+
/**
51+
* {@inheritdoc}
52+
*/
53+
public static function getDependencies()
54+
{
55+
return [];
56+
}
57+
58+
/**
59+
* {@inheritdoc}
60+
*/
61+
public static function getVersion()
62+
{
63+
return '2.0.0';
64+
}
65+
66+
/**
67+
* {@inheritdoc}
68+
*/
69+
public function getAliases()
70+
{
71+
return [];
72+
}
73+
}

app/code/Magento/CmsSampleData/Setup/InstallData.php

Lines changed: 0 additions & 35 deletions
This file was deleted.

0 commit comments

Comments
 (0)