first commit
This commit is contained in:
33
bundles/External/HannahBundle/Maileon/EventSubscriber/CronSubscriber.php
vendored
Normal file
33
bundles/External/HannahBundle/Maileon/EventSubscriber/CronSubscriber.php
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace External\HannahBundle\Maileon\EventSubscriber;
|
||||
|
||||
use External\HannahBundle\Maileon\Util\MaileonUtil;
|
||||
use KupShop\KupShopBundle\Event\CronEvent;
|
||||
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
||||
|
||||
class CronSubscriber implements EventSubscriberInterface
|
||||
{
|
||||
private $maileonUtil;
|
||||
|
||||
public function __construct(MaileonUtil $maileonUtil)
|
||||
{
|
||||
$this->maileonUtil = $maileonUtil;
|
||||
}
|
||||
|
||||
public static function getSubscribedEvents()
|
||||
{
|
||||
return [
|
||||
CronEvent::RUN_FREQUENT => [
|
||||
['generateCSVExports', 200],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function generateCSVExports(): void
|
||||
{
|
||||
$this->maileonUtil->generateCSVExports();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user