Dependency injection is the idea that a class is given the classes that it needs in the __construct method. Magento uses constructor dependency injection. In your __construct method, you list classes that you want to be injected and Magento’s DI system will do that for you. public function __construct( \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig ){ $this->scopeConfig = $scopeConfig;…