diff --git a/src/Controller/HandlePdfController.php b/src/Controller/HandlePdfController.php index 249270cdabf964642a84adf756940ff92d321f34..cf592eb6d9466622135a4606d81c33e28cfec9b4 100644 --- a/src/Controller/HandlePdfController.php +++ b/src/Controller/HandlePdfController.php @@ -4,6 +4,7 @@ namespace Drupal\fillpdf\Controller; use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\Controller\ControllerBase; +use Drupal\Core\Extension\ModuleHandlerInterface; use Drupal\Core\Link; use Drupal\Core\StreamWrapper\StreamWrapperInterface; use Drupal\Core\StreamWrapper\StreamWrapperManagerInterface; @@ -88,6 +89,13 @@ class HandlePdfController extends ControllerBase { */ protected $configFactory; + /** + * The module handler service. + * + * @var \Drupal\Core\Extension\ModuleHandlerInterface + */ + protected $moduleHandler; + /** * Constructs a FillPdfBackendManager object. * @@ -109,6 +117,8 @@ class HandlePdfController extends ControllerBase { * Provides a StreamWrapper manager. * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory * The configuration factory. + * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler + * The module handler service. */ public function __construct( FillPdfLinkManipulatorInterface $link_manipulator, @@ -119,7 +129,8 @@ class HandlePdfController extends ControllerBase { FillPdfActionPluginManager $action_manager, BackendProxyInterface $backend_proxy, StreamWrapperManagerInterface $stream_wrapper_manager, - ConfigFactoryInterface $config_factory + ConfigFactoryInterface $config_factory, + ModuleHandlerInterface $module_handler ) { $this->linkManipulator = $link_manipulator; $this->contextManager = $context_manager; @@ -130,6 +141,7 @@ class HandlePdfController extends ControllerBase { $this->backendProxy = $backend_proxy; $this->streamWrapperManager = $stream_wrapper_manager; $this->configFactory = $config_factory; + $this->moduleHandler = $module_handler; } /** @@ -145,7 +157,8 @@ class HandlePdfController extends ControllerBase { $container->get('plugin.manager.fillpdf_action.processor'), $container->get('fillpdf.backend_proxy'), $container->get('stream_wrapper_manager'), - $container->get('config.factory') + $container->get('config.factory'), + $container->get('module_handler') ); }