Magento 2 – Constructor DI
Magento 2 framework heavily uses dependency injection pattern. Almost for each class you will see classes, interfaces passed as an argument in class constructor. It’s simple principle is if a class having dependencies then these should be available at the time class object is created. Below is example of constructor dependency injection in magento frontend …