In this chapter, we had a look at the object manager and dependency injection, which are the foundations of Magento object management. We learned the meaning of the type
and preference
elements of dependency injection and how to use them to manipulate class construct parameters. Though there is much more to be said about dependency injection in Magento, the presented information should suffice and help us with other aspects of Magento.
In the next chapter, we will extend our journey into di.xml
via the concept of plugins.
3.143.168.172