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
Operation
Update
UpdateMain.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Framework\EntityManager\Operation\Update
;
7
8
use
Magento\Framework\EntityManager\TypeResolver
;
9
use
Magento\Framework\EntityManager\HydratorPool
;
10
use
Magento\Framework\EntityManager\Db\UpdateRow
;
11
15
class
UpdateMain
16
{
20
private
$typeResolver;
21
25
private
$hydratorPool;
26
30
private
$updateRow;
31
37
public
function
__construct
(
38
TypeResolver
$typeResolver,
39
HydratorPool
$hydratorPool,
40
UpdateRow
$updateRow
41
) {
42
$this->typeResolver = $typeResolver;
43
$this->hydratorPool = $hydratorPool;
44
$this->updateRow = $updateRow;
45
}
46
52
public
function
execute
(
$entity
,
$arguments
= [])
53
{
54
$entityType
= $this->typeResolver->resolve(
$entity
);
55
$hydrator = $this->hydratorPool->getHydrator(
$entityType
);
56
$arguments
= array_merge($hydrator->extract(
$entity
),
$arguments
);
57
$entityData = $this->updateRow->execute(
$entityType
,
$arguments
);
58
$entity
= $hydrator->hydrate(
$entity
, $entityData);
59
return
$entity
;
60
}
61
}
Magento\Framework\EntityManager\Operation\Update\UpdateMain\execute
execute($entity, $arguments=[])
Definition:
UpdateMain.php:52
Magento\Framework\EntityManager\Operation\Update\UpdateMain\__construct
__construct(TypeResolver $typeResolver, HydratorPool $hydratorPool, UpdateRow $updateRow)
Definition:
UpdateMain.php:37
Magento\Framework\EntityManager\Db\UpdateRow
Definition:
UpdateRow.php:17
$entityType
$entityType
Definition:
attribute_set_with_image_attribute.php:13
Magento\Framework\EntityManager\HydratorPool
Definition:
HydratorPool.php:13
Magento\Framework\EntityManager\TypeResolver
Definition:
TypeResolver.php:11
$entity
$entity
Definition:
element.phtml:22
$arguments
$arguments
Definition:
final_price.phtml:24
Magento\Framework\EntityManager\Operation\Update
Definition:
UpdateAttributes.php:6
Magento\Framework\EntityManager\Operation\Update\UpdateMain
Definition:
UpdateMain.php:15