Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
magento2-base
dev
tests
setup-integration
_files
Magento
TestSetupDeclarationModule3
revisions
patches_revision
ReferenceIncrementalSomeIntegerPatch.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\TestSetupDeclarationModule3\Setup\Patch\Data
;
7
8
use
Magento\Framework\App\ResourceConnection
;
9
use
Magento\Framework\Setup\Patch\DataPatchInterface
;
10
use
Magento\Framework\Setup\Patch\PatchRevertableInterface
;
11
use
Magento\Framework\Setup\Patch\PatchVersionInterface
;
12
17
class
ReferenceIncrementalSomeIntegerPatch
implements
18
DataPatchInterface
,
19
PatchRevertableInterface
,
20
PatchVersionInterface
21
{
25
private
$resourceConnection;
26
31
public
function
__construct
(
ResourceConnection
$resourceConnection)
32
{
33
$this->resourceConnection =
$resourceConnection
;
34
}
35
39
public
static
function
getVersion
()
40
{
41
return
'0.0.4'
;
42
}
43
47
public
function
getAliases
()
48
{
49
return
[];
50
}
51
55
public
function
apply
()
56
{
57
$adapter
= $this->resourceConnection->getConnection();
58
$adapter
->insert(
'test_table'
, [
'varchar'
=>
'Ololo123'
,
'varbinary'
=> 0101010]);
59
}
60
61
public
function
revert
()
62
{
63
$adapter
= $this->resourceConnection->getConnection();
64
$adapter
->delete(
'test_table'
, [
'`smallint` = ?'
=> 1]);
65
}
66
70
public
static
function
getDependencies
()
71
{
72
return
[
73
ZFirstPatch::class
74
];
75
}
76
}
Magento\TestSetupDeclarationModule3\Setup\Patch\Data\ReferenceIncrementalSomeIntegerPatch\getDependencies
static getDependencies()
Definition:
ReferenceIncrementalSomeIntegerPatch.php:70
Magento\TestSetupDeclarationModule3\Setup\Patch\Data\ReferenceIncrementalSomeIntegerPatch\getAliases
getAliases()
Definition:
ReferenceIncrementalSomeIntegerPatch.php:47
Magento\Framework\Setup\Patch\PatchRevertableInterface
Definition:
PatchRevertableInterface.php:17
Magento\Framework\Setup\Patch\DataPatchInterface
Definition:
DataPatchInterface.php:12
Magento\TestSetupDeclarationModule3\Setup\Patch\Data\ReferenceIncrementalSomeIntegerPatch\__construct
__construct(ResourceConnection $resourceConnection)
Definition:
ReferenceIncrementalSomeIntegerPatch.php:31
Magento\TestSetupDeclarationModule3\Setup\Patch\Data\ReferenceIncrementalSomeIntegerPatch\revert
revert()
Definition:
ReferenceIncrementalSomeIntegerPatch.php:61
$adapter
$adapter
Definition:
webapi_user.php:16
Magento\TestSetupDeclarationModule3\Setup\Patch\Data
Definition:
BicPatch.php:6
Magento\TestSetupDeclarationModule3\Setup\Patch\Data\ReferenceIncrementalSomeIntegerPatch
Definition:
ReferenceIncrementalSomeIntegerPatch.php:17
Magento\Framework\Setup\Patch\PatchVersionInterface
Definition:
PatchVersionInterface.php:13
$resourceConnection
$resourceConnection
Definition:
website_attribute_sync.php:32
Magento\Framework\App\ResourceConnection
Definition:
ResourceConnection.php:18
Magento\TestSetupDeclarationModule3\Setup\Patch\Data\ReferenceIncrementalSomeIntegerPatch\getVersion
static getVersion()
Definition:
ReferenceIncrementalSomeIntegerPatch.php:39
Magento\Framework\App\ResourceConnection
Magento\TestSetupDeclarationModule3\Setup\Patch\Data\ReferenceIncrementalSomeIntegerPatch\apply
apply()
Definition:
ReferenceIncrementalSomeIntegerPatch.php:55