|
|
|
|
|
|
|
|
use Lc\ShopBundle\Services\Utils; |
|
|
use Lc\ShopBundle\Services\Utils; |
|
|
use Lc\ShopBundle\Services\UtilsManager; |
|
|
use Lc\ShopBundle\Services\UtilsManager; |
|
|
use Mailjet\MailjetSwiftMailer\SwiftMailer\MailjetTransport; |
|
|
use Mailjet\MailjetSwiftMailer\SwiftMailer\MailjetTransport; |
|
|
|
|
|
use Symfony\Component\HttpFoundation\BinaryFileResponse; |
|
|
|
|
|
use Symfony\Component\HttpFoundation\StreamedResponse; |
|
|
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; |
|
|
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; |
|
|
use Symfony\Component\Security\Core\Security; |
|
|
use Symfony\Component\Security\Core\Security; |
|
|
use Symfony\Contracts\Translation\TranslatorInterface; |
|
|
use Symfony\Contracts\Translation\TranslatorInterface; |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if($document && $orderShop) { |
|
|
if($document && $orderShop) { |
|
|
$this->orderUtils->generateDocumentInvoiceOrderShop($orderShop, 'download') ; |
|
|
|
|
|
|
|
|
return new StreamedResponse(function () use ($orderShop) { |
|
|
|
|
|
$this->orderUtils->generateDocumentInvoiceOrderShop($orderShop, 'download') ; |
|
|
|
|
|
}); |
|
|
} |
|
|
} |
|
|
else { |
|
|
else { |
|
|
throw new NotFoundHttpException('Document introuvable') ; |
|
|
throw new NotFoundHttpException('Document introuvable') ; |