Skip to content
Snippets Groups Projects
Commit 3da83a05 authored by Liam Morland's avatar Liam Morland Committed by Liam Morland
Browse files

Issue #3274842: Inject ModuleHandler dependency

parent 4e6c2f18
No related branches found
No related tags found
No related merge requests found
...@@ -4,6 +4,7 @@ namespace Drupal\fillpdf\Controller; ...@@ -4,6 +4,7 @@ namespace Drupal\fillpdf\Controller;
use Drupal\Core\Config\ConfigFactoryInterface; use Drupal\Core\Config\ConfigFactoryInterface;
use Drupal\Core\Controller\ControllerBase; use Drupal\Core\Controller\ControllerBase;
use Drupal\Core\Extension\ModuleHandlerInterface;
use Drupal\Core\Link; use Drupal\Core\Link;
use Drupal\Core\StreamWrapper\StreamWrapperInterface; use Drupal\Core\StreamWrapper\StreamWrapperInterface;
use Drupal\Core\StreamWrapper\StreamWrapperManagerInterface; use Drupal\Core\StreamWrapper\StreamWrapperManagerInterface;
...@@ -88,6 +89,13 @@ class HandlePdfController extends ControllerBase { ...@@ -88,6 +89,13 @@ class HandlePdfController extends ControllerBase {
*/ */
protected $configFactory; protected $configFactory;
/**
* The module handler service.
*
* @var \Drupal\Core\Extension\ModuleHandlerInterface
*/
protected $moduleHandler;
/** /**
* Constructs a FillPdfBackendManager object. * Constructs a FillPdfBackendManager object.
* *
...@@ -109,6 +117,8 @@ class HandlePdfController extends ControllerBase { ...@@ -109,6 +117,8 @@ class HandlePdfController extends ControllerBase {
* Provides a StreamWrapper manager. * Provides a StreamWrapper manager.
* @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory
* The configuration factory. * The configuration factory.
* @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
* The module handler service.
*/ */
public function __construct( public function __construct(
FillPdfLinkManipulatorInterface $link_manipulator, FillPdfLinkManipulatorInterface $link_manipulator,
...@@ -119,7 +129,8 @@ class HandlePdfController extends ControllerBase { ...@@ -119,7 +129,8 @@ class HandlePdfController extends ControllerBase {
FillPdfActionPluginManager $action_manager, FillPdfActionPluginManager $action_manager,
BackendProxyInterface $backend_proxy, BackendProxyInterface $backend_proxy,
StreamWrapperManagerInterface $stream_wrapper_manager, StreamWrapperManagerInterface $stream_wrapper_manager,
ConfigFactoryInterface $config_factory ConfigFactoryInterface $config_factory,
ModuleHandlerInterface $module_handler
) { ) {
$this->linkManipulator = $link_manipulator; $this->linkManipulator = $link_manipulator;
$this->contextManager = $context_manager; $this->contextManager = $context_manager;
...@@ -130,6 +141,7 @@ class HandlePdfController extends ControllerBase { ...@@ -130,6 +141,7 @@ class HandlePdfController extends ControllerBase {
$this->backendProxy = $backend_proxy; $this->backendProxy = $backend_proxy;
$this->streamWrapperManager = $stream_wrapper_manager; $this->streamWrapperManager = $stream_wrapper_manager;
$this->configFactory = $config_factory; $this->configFactory = $config_factory;
$this->moduleHandler = $module_handler;
} }
/** /**
...@@ -145,7 +157,8 @@ class HandlePdfController extends ControllerBase { ...@@ -145,7 +157,8 @@ class HandlePdfController extends ControllerBase {
$container->get('plugin.manager.fillpdf_action.processor'), $container->get('plugin.manager.fillpdf_action.processor'),
$container->get('fillpdf.backend_proxy'), $container->get('fillpdf.backend_proxy'),
$container->get('stream_wrapper_manager'), $container->get('stream_wrapper_manager'),
$container->get('config.factory') $container->get('config.factory'),
$container->get('module_handler')
); );
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment