- Issue created by @pbabin
- ๐ฎ๐ณIndia mohd sahzad
mohd sahzad โ made their first commit to this issueโs fork.
- ๐ฎ๐ฉIndonesia el7cosmos ๐ฎ๐ฉ GMT+7
It's a best practice to inject the interface instead, as implementation can change.
/** * The module handler service. * * @var \Drupal\Core\Extension\ModuleHandlerInterface */ protected \Drupal\Core\Extension\ModuleHandlerInterface $moduleHandler;
Injecting interface means you can swap implementation without changing the code.