@@ -89,7 +89,7 @@ protected function convert(array $attributes, array $fieldset)
89
89
'handler ' => 'Magento\Framework\Indexer\Handler\AttributeHandler ' ,
90
90
'origin ' => $ attribute ->getName (),
91
91
'type ' => $ this ->getType ($ attribute ),
92
- 'dataType ' => $ this ->getBackendType ($ attribute ),
92
+ 'dataType ' => $ attribute ->getBackendType (),
93
93
'filters ' => [],
94
94
'entity ' => static ::ENTITY ,
95
95
'bind ' => isset ($ fieldset ['references ' ]['customer ' ]['to ' ])
@@ -100,25 +100,13 @@ protected function convert(array $attributes, array $fieldset)
100
100
} else {
101
101
$ fields [$ attribute ->getName ()] = [
102
102
'type ' => $ this ->getType ($ attribute ),
103
- 'dataType ' => $ this ->getBackendType ($ attribute ),
104
103
];
105
104
}
106
105
}
107
106
108
107
return $ fields ;
109
108
}
110
109
111
- /**
112
- * Get backend type for attribute
113
- *
114
- * @param Attribute $attribute
115
- * @return string
116
- */
117
- protected function getBackendType (Attribute $ attribute )
118
- {
119
- return $ attribute ->getBackendTypeByInput ($ attribute ->getFrontendInput ());
120
- }
121
-
122
110
/**
123
111
* Get field type for attribute
124
112
*
@@ -128,7 +116,7 @@ protected function getBackendType(Attribute $attribute)
128
116
protected function getType (Attribute $ attribute )
129
117
{
130
118
if (
131
- in_array ($ this -> getBackendType ( $ attribute ), ['varchar ' , 'text ' ])
119
+ in_array ($ attribute -> getFrontendInput ( ), ['text ' , 'textarea ' ])
132
120
&& $ attribute ->getData ('is_searchable_in_grid ' )
133
121
) {
134
122
$ type = 'searchable ' ;
0 commit comments