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.
Denae
5 days agoIzetta
10 days agoSkye
15 days ago