What should be the ...
 
Notifications
Clear all

What should be the magento standard way to do this:

1 Posts
1 Users
0 Likes
76 Views
(@swindellguillermo)
Posts: 719
Noble Member
Topic starter
 

Suppose there are 3 classes: Class A, B and C. Class C have dependecy of Class A You need to overrride/change an argument of class A, create an object of it and inject in Class B in such a way that it should not affect the class C.

What should be the magento standard way to do this:

A. In module’s etc/di.xml, define virtualType node to override argument and create a subclass of A. Then use type node to pass the subclass A object into class B.

B. In module’s etc/config.xml, define virtualType node to override argument and create a subclass of A. Then use type node to pass the subclass A object into class B.

C. In module’s etc/system.xml, define virtualType node to override argument and create a subclass of A. Then use type node to pass the subclass A object into class B.

D. In module’s etc/menu.xml, define virtualType node to override argument and create a subclass of A. Then use type node to pass the subclass A object into class B.

Show Answer Hide Answer

Suggested Answer: A
 
Posted : 04/01/2023 6:12 am
Topic Tags

Latest Adobe AD0-E704 Dumps Valid Version

Latest And Valid Q&A | Instant Download | Once Fail, Full Refund
Share: