OptionInterface
Magento\ConfigurableProduct\Api\Data\OptionInterface
What it does
This interface defines the contract for configurable product options in Magento 2, representing the attributes that customers can select (like size or color) when purchasing a configurable product.
Developers use this interface when working with configurable product configurations programmatically, such as creating, reading, or updating product variations through APIs or custom modules.
It manages the relationship between a configurable product and its attribute-based options, including the attribute ID, label, position, and associated values.
Public Methods
- getId()
- setId()
- getAttributeId()
- setAttributeId()
- getLabel()
- setLabel()
- getPosition()
- setPosition()
- getIsUseDefault()
- setIsUseDefault()
- getValues()
- setValues()
- getExtensionAttributes()
- setExtensionAttributes()
- getProductId()
- setProductId()