add Hiltes
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Marko
2022-08-10 16:59:07 +02:00
parent b0f7f04ba6
commit b992fd42ba
12 changed files with 21077 additions and 246 deletions

View File

@@ -0,0 +1,52 @@
<?php
namespace App\Command;
use App\Repository\OrdersRepository;
use Psr\Log\LoggerInterface;
use Symfony\Component\Console\Attribute\AsCommand;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Style\SymfonyStyle;
use App\Helper\Hiltes;
#[AsCommand(
name: 'hiltes:export',
description: 'Erstellt die Hiltes-Exportdatei aus den aktuellen Bestelldaten',
)]
class HiltesExportCommand extends Command
{
public function __construct(OrdersRepository $ordersRepository, LoggerInterface $logger)
{
$this->ordersRepository = $ordersRepository;
$this->logger = $logger;
parent::__construct();
}
protected function configure(): void
{
$this
->addArgument('arg1', InputArgument::OPTIONAL, 'Argument description')
->addOption('option1', null, InputOption::VALUE_NONE, 'Option description')
;
}
protected function execute(InputInterface $input, OutputInterface $output): int
{
$io = new SymfonyStyle($input, $output);
$hiltes = new Hiltes();
$hiltes->export('Test');
$io->success('Done!');
return Command::SUCCESS;
}
}