What is the scope of source model extend and implement between these two?



Attribute options are loaded via the attribute’s source class. The source class must extend \Magento\Eav\Model\Entity\Attribute\Source\ AbstractSource. which further extend Magento\Framework\Option\ArrayInterface.

but when to implement \Magento\Framework\Data\OptionSourceInterface

1 Answer 1


\Magento\Framework\Data\OptionSourceInterface is used when creating source model for system.xml configurations. And can be used with any other custom requirement. AbstractSource is specifically for EAV attributes.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.