Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
TypeLocator.php
Go to the documentation of this file.
1 <?php
7 namespace Magento\Eav\Model;
8 
12 
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 
46  {
47  foreach ($this->typeLocators as $typeLocator) {
48  $type = $typeLocator->getType($attributeCode, $entityType);
50  return $type;
51  }
52  }
53 
55  }
56 
60  public function getAllServiceDataInterfaces()
61  {
62  return $this->serviceTypeList->getDataTypes();
63  }
64 }
__construct(ServiceTypeListInterface $serviceTypeList, array $typeLocators=[])
Definition: TypeLocator.php:34
getType($attributeCode, $entityType)
Definition: TypeLocator.php:45
$type
Definition: item.phtml:13
$attributeCode
Definition: extend.phtml:12