2

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

\Magento\Eav\Model\Entity\Attribute\Source\AbstractSource

\Magento\Framework\Data\OptionSourceInterface

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

0

\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, privacy policy and cookie policy

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