Method | Description | |
---|---|---|
__construct ( Magento\Framework\App\Helper\Context $context, Magento\Framework\ObjectManagerInterface $objectManager, Magento\Catalog\Model\ResourceModel\Eav\AttributeFactory $attributeFactory, string $collectionFactory ) | ||
getAttributeCollection ( ) : Magento\Catalog\Model\ResourceModel\Product\Attribute\Collection | Retrieve a new product attribute collection. | |
getFieldType ( Magento\Eav\Model\Entity\Attribute\AttributeInterface $attribute ) : string | Get mapping field type for an attribute. | |
getIndexOptionText ( Magento\Eav\Model\Entity\Attribute\AttributeInterface $attribute, integer $storeId, string | integer $optionId ) : string | boolean | Transform an options id into an array of option value for attribute that uses a source. | |
getIndexOptionsText ( Magento\Eav\Model\Entity\Attribute\AttributeInterface $attribute, integer $storeId, array $optionIds ) : array | Transform an array of options ids into an arrays of option values for attribute that uses a source. | |
getMappingFieldOptions ( Magento\Eav\Model\Entity\Attribute\AttributeInterface $attribute ) : array | Parse attribute to get mapping field creation parameters. | |
prepareIndexValue ( Magento\Eav\Model\Entity\Attribute\AttributeInterface $attribute, integer $storeId, mixed $value ) : array | Parse attribute raw value (as saved in the database) to prepare the indexed value. |
Method | Description | |
---|---|---|
getAttributeByStore ( Magento\Eav\Model\Entity\Attribute\AttributeInterface | integer $attribute, integer $storeId ) : Magento\Catalog\Api\Data\EavAttributeInterface | Load the localized version of an attribute. | |
getAttributeId ( Magento\Eav\Model\Entity\Attribute\AttributeInterface | integer $attribute ) : integer | This util method is used to ensure the attribute is an integer and uses it's id if it is an object. | |
prepareSimpleIndexAttributeValue ( Magento\Eav\Model\Entity\Attribute\AttributeInterface $attribute, mixed $value ) : mixed | Ensure types of numerical values is correct before indexing. |
public __construct ( Magento\Framework\App\Helper\Context $context, Magento\Framework\ObjectManagerInterface $objectManager, Magento\Catalog\Model\ResourceModel\Eav\AttributeFactory $attributeFactory, string $collectionFactory ) | ||
$context | Magento\Framework\App\Helper\Context | Helper context. |
$objectManager | Magento\Framework\ObjectManagerInterface | The object manager |
$attributeFactory | Magento\Catalog\Model\ResourceModel\Eav\AttributeFactory | Factory used to create attributes. |
$collectionFactory | string | Factory class name to use for create attribute collections. |
public getAttributeCollection ( ) : Magento\Catalog\Model\ResourceModel\Product\Attribute\Collection | ||
return | Magento\Catalog\Model\ResourceModel\Product\Attribute\Collection |
public getFieldType ( Magento\Eav\Model\Entity\Attribute\AttributeInterface $attribute ) : string | ||
$attribute | Magento\Eav\Model\Entity\Attribute\AttributeInterface | Product attribute. |
return | string |
public getIndexOptionText ( Magento\Eav\Model\Entity\Attribute\AttributeInterface $attribute, integer $storeId, string | integer $optionId ) : string | boolean | ||
$attribute | Magento\Eav\Model\Entity\Attribute\AttributeInterface | Product attribute. |
$storeId | integer | Store id. |
$optionId | string | integer | Option id. |
return | string | boolean |
public getIndexOptionsText ( Magento\Eav\Model\Entity\Attribute\AttributeInterface $attribute, integer $storeId, array $optionIds ) : array | ||
$attribute | Magento\Eav\Model\Entity\Attribute\AttributeInterface | Product attribute. |
$storeId | integer | Store id |
$optionIds | array | Array of options ids. |
return | array |
public getMappingFieldOptions ( Magento\Eav\Model\Entity\Attribute\AttributeInterface $attribute ) : array | ||
$attribute | Magento\Eav\Model\Entity\Attribute\AttributeInterface | Product attribute. |
return | array |