platform/src/Core/Framework/MessageQueue/ScheduledTask/Subscriber/UpdatePostFinishSubscriber.php line 26

Open in your IDE?
  1. <?php declare(strict_types=1);
  2. namespace Shopware\Core\Framework\MessageQueue\ScheduledTask\Subscriber;
  3. use Shopware\Core\Framework\MessageQueue\ScheduledTask\Registry\TaskRegistry;
  4. use Shopware\Core\Framework\Update\Event\UpdatePostFinishEvent;
  5. use Symfony\Component\EventDispatcher\EventSubscriberInterface;
  6. class UpdatePostFinishSubscriber implements EventSubscriberInterface
  7. {
  8.     private TaskRegistry $registry;
  9.     public function __construct(TaskRegistry $taskRegistry)
  10.     {
  11.         $this->registry $taskRegistry;
  12.     }
  13.     /**
  14.      * @inheritDoc
  15.      */
  16.     public static function getSubscribedEvents(): array
  17.     {
  18.         return [UpdatePostFinishEvent::class => 'updatePostFinishEvent'];
  19.     }
  20.     public function updatePostFinishEvent(): void
  21.     {
  22.         $this->registry->registerTasks();
  23.     }
  24. }