From 24ac91202ed54ee341d025d98fe77dbb1e4f0285 Mon Sep 17 00:00:00 2001 From: SirDomin Date: Mon, 16 Nov 2020 15:00:13 +0100 Subject: [PATCH] command added --- .../ApiBundle/Command/OrderEmailSender.php | 42 +++++++++++++++++++ .../Command/OrderEmailSenderInterface.php | 21 ++++++++++ 2 files changed, 63 insertions(+) create mode 100644 src/Sylius/Bundle/ApiBundle/Command/OrderEmailSender.php create mode 100644 src/Sylius/Bundle/ApiBundle/Command/OrderEmailSenderInterface.php diff --git a/src/Sylius/Bundle/ApiBundle/Command/OrderEmailSender.php b/src/Sylius/Bundle/ApiBundle/Command/OrderEmailSender.php new file mode 100644 index 00000000000..fdcb235a9d8 --- /dev/null +++ b/src/Sylius/Bundle/ApiBundle/Command/OrderEmailSender.php @@ -0,0 +1,42 @@ +emailSender = $emailSender; + } + + public function sendConfirmationEmail(OrderInterface $order): void + { + $this->emailSender->send( + Emails::ORDER_CONFIRMATION_RESENT, + [$order->getCustomer()->getEmail()], + [ + 'order' => $order, + 'channel' => $order->getChannel(), + 'localeCode' => $order->getLocaleCode(), + ] + ); + } +} diff --git a/src/Sylius/Bundle/ApiBundle/Command/OrderEmailSenderInterface.php b/src/Sylius/Bundle/ApiBundle/Command/OrderEmailSenderInterface.php new file mode 100644 index 00000000000..258d8a10352 --- /dev/null +++ b/src/Sylius/Bundle/ApiBundle/Command/OrderEmailSenderInterface.php @@ -0,0 +1,21 @@ +