src/Form/EventSubscriber/SendFormContactInsuranceEmailSubscriber.php line 41
<?phpdeclare(strict_types=1);/*** Copyright (c) 2024 TECLA Consulting Group oü.* All rights reserved.** This unpublished material is proprietary to TECLA Consulting Group oü.* All rights reserved. The methods and* techniques described herein are considered trade secrets* and/or confidential. Reproduction or distribution, in whole* or in part, is forbidden except by express written permission* of TECLA Consulting Group oü.** @author Matúš Sýkorjak <matus@tecla.no>* @copyright 2024 TECLA Consulting Group oü*/namespace App\Form\EventSubscriber;use App\Form\Event\FormContactInsurance\CreatedEvent;use App\Form\Mailer\FormContactInsuranceMailerInterface;use Symfony\Component\EventDispatcher\EventSubscriberInterface;final class SendFormContactInsuranceEmailSubscriber implements EventSubscriberInterface{private FormContactInsuranceMailerInterface $mailer;public function __construct(FormContactInsuranceMailerInterface $mailer){$this->mailer = $mailer;}public static function getSubscribedEvents(): array{return [CreatedEvent::class => 'onCreatedEvent',];}public function onCreatedEvent(CreatedEvent $event): void{$this->mailer->send($event->getForm());}}