Keeping upgradeability in mind, how do you configure di.xml to make the substitution happen?

Posted by: Pdfprep Category: AD0-E703 Tags: , ,

You are making some major adjustments to a core Magento class (ClassA). These adjustments are only necessary when utilized from a specific Magento class (ClassB). You have created MyClass that contains the needed customizations.

Keeping upgradeability in mind, how do you configure di.xml to make the substitution happen?
A . Ensure that MyClass extends ModuleA and set the <argument/>, for ModuleB to point to your new class in di.xml.
B . Set a <preference/> for ModuleA to be replaced by MyClass
C . Create a rewrite node that injects MyClass into Class
E . Create a virtual type that extends ModuleB, specifying an <argument/> for MyClass.

Answer: A

Leave a Reply

Your email address will not be published.