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
ExtensionPool.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\Framework\EntityManager\Operation
;
8
9
use
Magento\Framework\ObjectManagerInterface
;
10
14
class
ExtensionPool
15
{
19
protected
$objectManager
;
20
24
protected
$actions
;
25
30
public
function
__construct
(
31
ObjectManagerInterface
$objectManager
,
32
array $extensionActions = []
33
) {
34
$this->objectManager =
$objectManager
;
35
$this->actions = $extensionActions;
36
}
37
44
public
function
getActions
(
$entityType
, $actionName)
45
{
46
$actions
= [];
47
if
(!isset($this->actions[
$entityType
][$actionName])) {
48
return
$actions
;
49
}
50
foreach
($this->actions[
$entityType
][$actionName] as $actionClassName) {
51
$action = $this->objectManager->get($actionClassName);
52
if
(!($action instanceof
ExtensionInterface
)) {
53
throw
new \LogicException(get_class($action) .
' must implement '
. ExtensionInterface::class);
54
}
55
$actions
[] = $action;
56
}
57
return
$actions
;
58
}
59
}
Magento\Framework\ObjectManagerInterface
Definition:
ObjectManagerInterface.php:12
Magento\Framework\EntityManager\Operation\ExtensionInterface
Definition:
ExtensionInterface.php:11
Magento\Framework\EntityManager\Operation\ExtensionPool\__construct
__construct(ObjectManagerInterface $objectManager, array $extensionActions=[])
Definition:
ExtensionPool.php:30
$entityType
$entityType
Definition:
attribute_set_with_image_attribute.php:13
Magento\Framework\EntityManager\Operation\ExtensionPool\$actions
$actions
Definition:
ExtensionPool.php:24
Magento\Framework\EntityManager\Operation\ExtensionPool
Definition:
ExtensionPool.php:14
Magento\Framework\EntityManager\Operation\ExtensionPool\getActions
getActions($entityType, $actionName)
Definition:
ExtensionPool.php:44
Magento\Framework\EntityManager\Operation\ExtensionPool\$objectManager
$objectManager
Definition:
ExtensionPool.php:19
Magento\Framework\EntityManager\Operation
Definition:
AttributeInterface.php:7