Files
kupshop/bundles/KupShop/OrderingBundle/Command/NotifyWaitingPackageCommand.php
2025-08-02 16:30:27 +02:00

35 lines
888 B
PHP

<?php
namespace KupShop\OrderingBundle\Command;
use KupShop\OrderingBundle\EventListener\CronListener;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
class NotifyWaitingPackageCommand extends Command
{
/** @var CronListener */
private $cronListener;
public function __construct(CronListener $cronListener)
{
parent::__construct();
$this->cronListener = $cronListener;
}
protected function configure()
{
$this
->setName('kupshop:ordering:notify-waiting-package')
->setDescription('Notify customers about waiting packages');
}
protected function execute(InputInterface $input, OutputInterface $output)
{
$this->cronListener->handleNotifyWaitingPackage();
return 0;
}
}