vendor/shopware/core/Framework/MessageQueue/ScheduledTask/Subscriber/UpdatePostFinishSubscriber.php line 29

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.     /**
  10.      * @internal
  11.      */
  12.     public function __construct(TaskRegistry $taskRegistry)
  13.     {
  14.         $this->registry $taskRegistry;
  15.     }
  16.     /**
  17.      * @return array<string, string|array{0: string, 1: int}|list<array{0: string, 1?: int}>>
  18.      */
  19.     public static function getSubscribedEvents(): array
  20.     {
  21.         return [UpdatePostFinishEvent::class => 'updatePostFinishEvent'];
  22.     }
  23.     public function updatePostFinishEvent(): void
  24.     {
  25.         $this->registry->registerTasks();
  26.     }
  27. }