Skip to content
This repository has been archived by the owner on Jun 8, 2024. It is now read-only.

Commit

Permalink
feat: Support Shopware 5.6
Browse files Browse the repository at this point in the history
  • Loading branch information
shyim committed Jun 17, 2021
1 parent cfeef97 commit 13e09af
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
4 changes: 3 additions & 1 deletion Commands/ExportMailTemplatesCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,7 @@ protected function execute(InputInterface $input, OutputInterface $output)

$io = new SymfonyStyle($input, $output);
$io->success(sprintf('Exported %d mail templates from database to "%s"', count($mailTemplates), realpath($folder)));

return 0;
}
}
}
8 changes: 4 additions & 4 deletions Components/TemplateMailFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@ public function factory(Container $container)
$container->load('MailTransport');

$stringCompiler = new \Shopware_Components_StringCompiler(
clone $container->get('Template')
clone $container->get('template')
);
$mailer = new TemplateMail(
$container->get('theme_inheritance'),
$container->get('frosh_template_mail.template_mail_loader')
);
if ($container->initialized('Shop')) {
$mailer->setShop($container->get('Shop'));
if ($container->initialized('shop')) {
$mailer->setShop($container->get('shop'));
}
$mailer->setModelManager($container->get('Models'));
$mailer->setModelManager($container->get('models'));
$mailer->setStringCompiler($stringCompiler);

return $mailer;
Expand Down
1 change: 1 addition & 0 deletions Resources/services.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">

<services>
<defaults public="true"/>
<service id="frosh_template_mail.template_mail_loader" class="FroshTemplateMail\Components\TemplateMailLoader">
<argument type="tagged" tag="frosh_template_mail.loader"/>
</service>
Expand Down

0 comments on commit 13e09af

Please sign in to comment.