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-elasticsearch
Elasticsearch5
Model
Adapter
FieldMapper
Product
FieldProvider
FieldType
Resolver
KeywordType.php
Go to the documentation of this file.
1
<?php
6
declare(strict_types=1);
7
8
namespace
Magento\Elasticsearch\Elasticsearch5\Model\Adapter\FieldMapper\Product\FieldProvider\FieldType\Resolver
;
9
10
use
Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\AttributeAdapter
;
11
use
Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\FieldProvider\FieldType\ConverterInterface
;
12
use
Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\FieldProvider\FieldType\ResolverInterface
;
13
17
class
KeywordType
implements
ResolverInterface
18
{
22
private
$fieldTypeConverter;
23
27
public
function
__construct
(
ConverterInterface
$fieldTypeConverter)
28
{
29
$this->fieldTypeConverter = $fieldTypeConverter;
30
}
31
38
public
function
getFieldType
(
AttributeAdapter
$attribute
): ?string
39
{
40
if
(
$attribute
->isComplexType()
41
|| (!
$attribute
->isSearchable() && !
$attribute
->isAlwaysIndexable() &&
$attribute
->isFilterable())
42
) {
43
return
$this->fieldTypeConverter->convert(
ConverterInterface::INTERNAL_DATA_TYPE_KEYWORD
);
44
}
45
46
return
null
;
47
}
48
}
Magento\Elasticsearch\Elasticsearch5\Model\Adapter\FieldMapper\Product\FieldProvider\FieldType\Resolver\KeywordType
Definition:
KeywordType.php:17
$attribute
$attribute
Definition:
attribute_set_with_image_attribute.php:41
Magento\Elasticsearch\Elasticsearch5\Model\Adapter\FieldMapper\Product\FieldProvider\FieldType\Resolver
Definition:
CompositeResolver.php:8
Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\AttributeAdapter
Definition:
AttributeAdapter.php:15
Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\FieldProvider\FieldType\ResolverInterface
Definition:
ResolverInterface.php:15
Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\AttributeAdapter
Definition:
DummyAttribute.php:8
Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\FieldProvider\FieldType\ConverterInterface\INTERNAL_DATA_TYPE_KEYWORD
const INTERNAL_DATA_TYPE_KEYWORD
Definition:
ConverterInterface.php:23
Magento\Elasticsearch\Elasticsearch5\Model\Adapter\FieldMapper\Product\FieldProvider\FieldType\Resolver\KeywordType\__construct
__construct(ConverterInterface $fieldTypeConverter)
Definition:
KeywordType.php:27
Magento\Elasticsearch\Model\Adapter\FieldMapper\Product\FieldProvider\FieldType\ConverterInterface
Definition:
ConverterInterface.php:14
Magento\Elasticsearch\Elasticsearch5\Model\Adapter\FieldMapper\Product\FieldProvider\FieldType\Resolver\KeywordType\getFieldType
getFieldType(AttributeAdapter $attribute)
Definition:
KeywordType.php:38