19 private $objectManager;
24 private $fieldMappers;
31 private $fieldMapperEntity;
39 array $fieldMappers = []
42 $this->fieldMappers = $fieldMappers;
60 return $this->getEntity(
$entityType)->getAllAttributesTypes($context);
72 if (empty($this->fieldMapperEntity)) {
75 'No entity type given' 79 throw new \LogicException(
83 $fieldMapperClass = $this->fieldMappers[
$entityType];
84 $this->fieldMapperEntity = $this->objectManager->create($fieldMapperClass);
85 if (!($this->fieldMapperEntity instanceof FieldMapperInterface)) {
86 throw new \InvalidArgumentException(
87 'Field mapper must implement \Magento\Elasticsearch\Model\Adapter\FieldMapperInterface' 91 return $this->fieldMapperEntity;
getFieldName($attributeCode, $context=[])
const ELASTICSEARCH_TYPE_DEFAULT
getAllAttributesTypes($context=[])
__construct(ObjectManagerInterface $objectManager, array $fieldMappers=[])