From 14d90c25ae5d247d09b8859d2d8f68f7b145bffb Mon Sep 17 00:00:00 2001 From: Mikkel Ricky Date: Thu, 5 Oct 2023 09:44:26 +0200 Subject: [PATCH] Fixed dependency injection --- modules/os2forms_forloeb/os2forms_forloeb.services.yml | 4 ++-- modules/os2forms_forloeb/src/MaestroHelper.php | 8 +++----- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/modules/os2forms_forloeb/os2forms_forloeb.services.yml b/modules/os2forms_forloeb/os2forms_forloeb.services.yml index 132f3f3b..a9578935 100644 --- a/modules/os2forms_forloeb/os2forms_forloeb.services.yml +++ b/modules/os2forms_forloeb/os2forms_forloeb.services.yml @@ -15,7 +15,7 @@ services: - '@plugin.manager.mail' - '@language_manager' - '@webform.theme_manager' + - '@plugin.manager.entity_print.print_engine' + - '@Drupal\os2forms_digital_post\Helper\DigitalPostHelper' - '@logger.channel.os2forms_forloeb' - '@logger.channel.os2forms_forloeb_submission' - - '@module_handler' - - '@plugin.manager.entity_print.print_engine' diff --git a/modules/os2forms_forloeb/src/MaestroHelper.php b/modules/os2forms_forloeb/src/MaestroHelper.php index 05032c71..ce0b5fbb 100644 --- a/modules/os2forms_forloeb/src/MaestroHelper.php +++ b/modules/os2forms_forloeb/src/MaestroHelper.php @@ -12,7 +12,6 @@ use Drupal\Core\Config\ImmutableConfig; use Drupal\Core\Entity\EntityStorageInterface; use Drupal\Core\Entity\EntityTypeManagerInterface; -use Drupal\Core\Extension\ModuleHandlerInterface; use Drupal\Core\Language\LanguageManagerInterface; use Drupal\Core\Logger\LoggerChannelInterface; use Drupal\Core\Mail\MailManagerInterface; @@ -77,11 +76,10 @@ public function __construct( private readonly MailManagerInterface $mailManager, private readonly LanguageManagerInterface $languageManager, private readonly WebformThemeManagerInterface $webformThemeManager, - private readonly LoggerChannelInterface $logger, - private readonly LoggerChannelInterface $submissionLogger, - private readonly ModuleHandlerInterface $moduleHandler, private readonly EntityPrintPluginManagerInterface $entityPrintPluginManager, - private readonly DigitalPostHelper $digitalPostHelper + private readonly DigitalPostHelper $digitalPostHelper, + private readonly LoggerChannelInterface $logger, + private readonly LoggerChannelInterface $submissionLogger ) { $this->config = $configFactory->get(SettingsForm::SETTINGS); $this->webformSubmissionStorage = $entityTypeManager->getStorage('webform_submission');