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

Issue #3274842: Remove unnecessary dependency injection of ModuleHandler

Use the version from ControllerBase.

This reverts commit 63096c7b.
This reverts commit 3da83a05.
parent 220d5e13
No related branches found
No related tags found
No related merge requests found
......@@ -4,7 +4,6 @@ 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;
......@@ -89,13 +88,6 @@ class HandlePdfController extends ControllerBase {
*/
protected $configFactory;
/**
* The module handler service.
*
* @var \Drupal\Core\Extension\ModuleHandlerInterface
*/
protected $moduleHandler;
/**
* Constructs a FillPdfBackendManager object.
*
......@@ -117,8 +109,6 @@ 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,
......@@ -130,7 +120,6 @@ class HandlePdfController extends ControllerBase {
BackendProxyInterface $backend_proxy,
StreamWrapperManagerInterface $stream_wrapper_manager,
ConfigFactoryInterface $config_factory,
ModuleHandlerInterface $module_handler,
) {
$this->linkManipulator = $link_manipulator;
$this->contextManager = $context_manager;
......@@ -141,7 +130,6 @@ class HandlePdfController extends ControllerBase {
$this->backendProxy = $backend_proxy;
$this->streamWrapperManager = $stream_wrapper_manager;
$this->configFactory = $config_factory;
$this->moduleHandler = $module_handler;
}
/**
......@@ -158,7 +146,6 @@ class HandlePdfController extends ControllerBase {
$container->get('fillpdf.backend_proxy'),
$container->get('stream_wrapper_manager'),
$container->get('config.factory'),
$container->get('module_handler')
);
}
......@@ -171,7 +158,7 @@ class HandlePdfController extends ControllerBase {
* The FillPDF context to alter.
*/
public function alterContext(array &$context): void {
$this->moduleHandler->alter('fillpdf_populate_pdf_context', $context);
$this->moduleHandler()->alter('fillpdf_populate_pdf_context', $context);
}
/**
......
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