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
Model
ResourceModel
Db
VersionControl
RelationComposite.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Framework\Model\ResourceModel\Db\VersionControl
;
7
8
use
Magento\Framework\Model\AbstractModel
;
9
use
Magento\Framework\Event\ManagerInterface
as EventManager;
10
14
class
RelationComposite
15
{
19
protected
$relationProcessors
;
20
24
protected
$eventManager
;
25
30
public
function
__construct
(
31
EventManager
$eventManager
,
32
array
$relationProcessors
= []
33
) {
34
$this->eventManager =
$eventManager
;
35
$this->relationProcessors =
$relationProcessors
;
36
}
37
44
public
function
processRelations(
AbstractModel
$object)
45
{
46
foreach
($this->relationProcessors as
$processor
) {
48
$processor
->processRelation($object);
49
}
50
$this->eventManager->dispatch(
51
$object->
getEventPrefix
().
'_process_relation'
,
52
[
53
'object'
=> $object
54
]
55
);
56
}
57
}
Magento\Framework\Model\AbstractModel
Definition:
AbstractModel.php:19
Magento\Framework\Model\ResourceModel\Db\VersionControl\RelationComposite\$eventManager
$eventManager
Definition:
RelationComposite.php:24
$processor
$processor
Definition:
404.php:10
Magento\Framework\Model\ResourceModel\Db\VersionControl\RelationComposite\__construct
__construct(EventManager $eventManager, array $relationProcessors=[])
Definition:
RelationComposite.php:30
Magento\Framework\Model\ResourceModel\Db\VersionControl
Definition:
AbstractDb.php:6
Magento\Framework\Model\ResourceModel\Db\VersionControl\RelationComposite\$relationProcessors
$relationProcessors
Definition:
RelationComposite.php:19
Magento\Framework\Event\ManagerInterface
Definition:
ManagerInterface.php:12
Magento\Framework\Model\AbstractModel\getEventPrefix
getEventPrefix()
Definition:
AbstractModel.php:980
Magento\Framework\Model\ResourceModel\Db\VersionControl\RelationComposite
Definition:
RelationComposite.php:14