An Adobe Commerce developer is developing a custom module. As part of their implementation they have decided that all instances of their Custom\Module\Model\Example class should receive a new instance of Magento\Filesystem\Adapter\Local.
How would the developer achieve this using di. xml?
A)

B)

C)

The developer can achieve this by adding the following configuration to their di.xml file:
XML
<config>
<component name='CustomModuleModelExample' factory='CustomModuleModelExampleFactory'>
</component>
</config>
This configuration will ensure that all instances of the CustomModuleModelExample class will receive a new instance of the MagentoFilesystemAdapterLocal class.
Currently there are no comments in this discussion, be the first to comment!