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
framework
EntityManager
Db
DeleteRow.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\Framework\EntityManager\Db
;
8
9
use
Magento\Framework\EntityManager\MetadataPool
;
10
use
Magento\Framework\App\ResourceConnection
;
11
15
class
DeleteRow
16
{
20
private
$metadataPool;
21
25
private
$resourceConnection;
26
33
public
function
__construct
(
34
MetadataPool
$metadataPool,
35
ResourceConnection
$resourceConnection
36
) {
37
$this->metadataPool = $metadataPool;
38
$this->resourceConnection =
$resourceConnection
;
39
}
40
47
public
function
execute
(
$entityType
,
$data
)
48
{
49
$metadata = $this->metadataPool->getMetadata(
$entityType
);
50
$connection
= $this->resourceConnection->getConnectionByName($metadata->getEntityConnectionName());
51
return
$connection
->delete(
52
$metadata->getEntityTable(),
53
[$metadata->getLinkField() .
' = ?'
=>
$data
[$metadata->getLinkField()]]
54
);
55
}
56
}
Magento\Framework\EntityManager\Db\DeleteRow\execute
execute($entityType, $data)
Definition:
DeleteRow.php:47
$entityType
$entityType
Definition:
attribute_set_with_image_attribute.php:13
Magento\Framework\EntityManager\MetadataPool
Definition:
MetadataPool.php:18
$data
$data
Definition:
attribute_set_with_image_attribute.php:16
Magento\Framework\EntityManager\Db\DeleteRow
Definition:
DeleteRow.php:15
$resourceConnection
$resourceConnection
Definition:
website_attribute_sync.php:32
Magento\Framework\App\ResourceConnection
Definition:
ResourceConnection.php:18
Magento\Framework\EntityManager\Db\DeleteRow\__construct
__construct(MetadataPool $metadataPool, ResourceConnection $resourceConnection)
Definition:
DeleteRow.php:33
$connection
$connection
Definition:
bulk.php:13
Magento\Framework\App\ResourceConnection
Magento\Framework\EntityManager\Db
Definition:
CreateRow.php:7