-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathNonRevertable.php
42 lines (41 loc) · 1.08 KB
/
NonRevertable.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php
declare(strict_types=1);
namespace BDC\Declarative\Setup\Patch\Data;
use Magento\Framework\Setup\Patch\DataPatchInterface;
use Magento\Framework\Setup\ModuleDataSetupInterface;
/**
* Class NonRevertable
* @package BDC\Declarative\Setup\Patch\Data
*/
class NonRevertable implements DataPatchInterface{
/**
* @var ModuleDataSetupInterface $moduleDataSetup
*/
private $moduleDataSetup;
/**
* @param ModuleDataSetupInterface $moduleDataSetup
*/
public function __construct(ModuleDataSetupInterface $moduleDataSetup){
$this->moduleDataSetup = $moduleDataSetup;
}
/**
* Do Upgrade
* @return void
*/
public function apply(){
$data = ['name' => 'Matin Rahman', 'email' => 'matinict@gmail.com','note' => 'Declarative insert'];
$this->moduleDataSetup->getConnection()->insert('bdc_declarative', $data);
}
/**
* {@inheritdoc}
*/
public function getAliases(){
return [];
}
/**
* {@inheritdoc}
*/
public static function getDependencies(){
return [];
}
}