*/
class SaleCheckActivationCommand extends ContainerAwareCommand
{
public function configure()
{
$this
->setName("sale:check-activation")
->setDescription("check the activation and deactivation dates of sales, and perform the required action depending on the current date.");
}
public function execute(InputInterface $input, OutputInterface $output)
{
try {
$this->getDispatcher()->dispatch(
TheliaEvents::CHECK_SALE_ACTIVATION_EVENT,
new SaleActiveStatusCheckEvent()
);
$output->writeln("Sale verification processed successfully");
} catch (\Exception $ex) {
$output->writeln(sprintf("Error : %s", $ex->getMessage()));
}
}
}