Typo3UndeleteHandler.php 587 B

123456789101112131415161718192021222324
  1. <?php
  2. namespace App\Message\Handler\Typo3;
  3. use App\Message\Message\Typo3\Typo3Undelete;
  4. use App\Service\Typo3\Typo3Service;
  5. use Symfony\Component\Messenger\Attribute\AsMessageHandler;
  6. #[AsMessageHandler(priority: 1)]
  7. class Typo3UndeleteHandler
  8. {
  9. public function __construct(
  10. private Typo3Service $typo3Service,
  11. ) {
  12. }
  13. /**
  14. * @throws \Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface
  15. */
  16. public function __invoke(Typo3Undelete $command): void
  17. {
  18. $this->typo3Service->undeleteSite($command->getOrganizationId());
  19. }
  20. }