/** * {@inheritDoc} */ public function loadAttributeOptions() { $productAttributes = $this->attributeList->getAttributeCollection(); $attributes = []; foreach ($productAttributes as $attribute) { $attributes[$attribute->getAttributeCode()] = $attribute->getFrontendLabel(); } $this->_addSpecialAttributes($attributes); asort($attributes); $this->setAttributeOption($attributes); return $this; }
/** * Retrieve ES mapping field name used for the current condition (including analyzer). * * @param ProductCondition $productCondition Product condition. * * @return string */ private function getSearchFieldName(ProductCondition $productCondition) { $attributeName = $productCondition->getAttribute(); $field = $this->attributeList->getField($attributeName); $analyzer = FieldInterface::ANALYZER_UNTOUCHED; if ($productCondition->getInputType() === "string") { $analyzer = FieldInterface::ANALYZER_STANDARD; } return $field->getMappingProperty($analyzer); }