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
module-eav
Model
TypeLocator.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\Eav\Model
;
8
9
use
Magento\Framework\Reflection\TypeProcessor
;
10
use
Magento\Framework\Webapi\CustomAttribute\ServiceTypeListInterface
;
11
use
Magento\Framework\Webapi\CustomAttributeTypeLocatorInterface
;
12
16
class
TypeLocator
implements
CustomAttributeTypeLocatorInterface
17
{
21
private
$typeLocators;
22
26
private
$serviceTypeList;
27
34
public
function
__construct
(
35
ServiceTypeListInterface
$serviceTypeList,
36
array $typeLocators = []
37
) {
38
$this->typeLocators = $typeLocators;
39
$this->serviceTypeList = $serviceTypeList;
40
}
41
45
public
function
getType
(
$attributeCode
,
$entityType
)
46
{
47
foreach
($this->typeLocators as $typeLocator) {
48
$type
= $typeLocator->getType(
$attributeCode
,
$entityType
);
49
if
(
$type
!==
TypeProcessor::NORMALIZED_ANY_TYPE
) {
50
return
$type
;
51
}
52
}
53
54
return
TypeProcessor::NORMALIZED_ANY_TYPE
;
55
}
56
60
public
function
getAllServiceDataInterfaces
()
61
{
62
return
$this->serviceTypeList->getDataTypes();
63
}
64
}
Magento\Eav\Model\TypeLocator
Definition:
TypeLocator.php:16
Magento\Framework\Webapi\CustomAttributeTypeLocatorInterface
Definition:
CustomAttributeTypeLocatorInterface.php:12
Magento\Eav\Model\TypeLocator\__construct
__construct(ServiceTypeListInterface $serviceTypeList, array $typeLocators=[])
Definition:
TypeLocator.php:34
Magento\Framework\Webapi\CustomAttribute\ServiceTypeListInterface
Definition:
ServiceTypeListInterface.php:9
Magento\Eav\Model\TypeLocator\getType
getType($attributeCode, $entityType)
Definition:
TypeLocator.php:45
Magento\Framework\Reflection\TypeProcessor
Definition:
TypeProcessor.php:24
$entityType
$entityType
Definition:
attribute_set_with_image_attribute.php:13
Magento\Framework\Reflection\TypeProcessor\NORMALIZED_ANY_TYPE
const NORMALIZED_ANY_TYPE
Definition:
TypeProcessor.php:43
$type
$type
Definition:
item.phtml:13
Magento\Eav\Model
$attributeCode
$attributeCode
Definition:
extend.phtml:12
Magento\Eav\Model\TypeLocator\getAllServiceDataInterfaces
getAllServiceDataInterfaces()
Definition:
TypeLocator.php:60