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
EntityRegistry.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\Framework\Model
;
8
12
class
EntityRegistry
13
{
17
protected
$registry
= [];
18
27
public
function
register
(
$entityType
, $identifier,
$entity
)
28
{
29
$this->registry[
$entityType
][$identifier] =
$entity
;
30
}
31
39
public
function
retrieve
(
$entityType
, $identifier)
40
{
41
if
(isset($this->registry[
$entityType
][$identifier])) {
42
return
$this->registry[
$entityType
][$identifier];
43
}
else
{
44
return
null
;
45
}
46
}
47
55
public
function
remove
(
$entityType
, $identifier)
56
{
57
if
(isset($this->registry[
$entityType
][$identifier])) {
58
unset($this->registry[
$entityType
][$identifier]);
59
}
60
return
true
;
61
}
62
}
Magento\Framework\Model
Definition:
AbstractExtensibleModel.php:7
Magento\Framework\Model\EntityRegistry\retrieve
retrieve($entityType, $identifier)
Definition:
EntityRegistry.php:39
Magento\Framework\Model\EntityRegistry
Definition:
EntityRegistry.php:12
$entityType
$entityType
Definition:
attribute_set_with_image_attribute.php:13
$entity
$entity
Definition:
element.phtml:22
Magento\Framework\Model\EntityRegistry\$registry
$registry
Definition:
EntityRegistry.php:17