-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2228 from MTES-MCT/feature/2227-tag-brevo-mail-re…
…lances [BO] Ajout tag brevo sur les mail de relances
- Loading branch information
Showing
5 changed files
with
55 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
src/Service/Mailer/Mail/Signalement/SignalementFeedbackUsagerWithoutResponseMailer.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<?php | ||
|
||
namespace App\Service\Mailer\Mail\Signalement; | ||
|
||
use App\Service\Mailer\Mail\AbstractNotificationMailer; | ||
use App\Service\Mailer\NotificationMail; | ||
use App\Service\Mailer\NotificationMailerType; | ||
use Psr\Log\LoggerInterface; | ||
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface; | ||
use Symfony\Component\Mailer\MailerInterface; | ||
use Symfony\Component\Routing\Generator\UrlGeneratorInterface; | ||
|
||
class SignalementFeedbackUsagerWithoutResponseMailer extends AbstractNotificationMailer | ||
{ | ||
protected ?NotificationMailerType $mailerType = | ||
NotificationMailerType::TYPE_SIGNALEMENT_FEEDBACK_USAGER_WITHOUT_RESPONSE; | ||
protected ?string $mailerSubject = '%param.platform_name% : faites le point sur votre problème de logement !'; | ||
protected ?string $mailerButtonText = 'Mettre à jour ma situation'; | ||
protected ?string $mailerTemplate = 'demande_feedback_usager_email'; | ||
protected ?string $tagHeader = 'Usager relance sans reponse'; | ||
|
||
public function __construct( | ||
protected MailerInterface $mailer, | ||
protected ParameterBagInterface $parameterBag, | ||
protected LoggerInterface $logger, | ||
protected UrlGeneratorInterface $urlGenerator, | ||
) { | ||
parent::__construct($this->mailer, $this->parameterBag, $this->logger, $this->urlGenerator); | ||
} | ||
|
||
public function getMailerParamsFromNotification(NotificationMail $notificationMail): array | ||
{ | ||
$signalement = $notificationMail->getSignalement(); | ||
$toRecipient = $notificationMail->getTo(); | ||
|
||
return [ | ||
'signalement' => $signalement, | ||
'from' => $toRecipient, | ||
'lien_suivi' => $this->generateLink( | ||
'front_suivi_signalement', | ||
['code' => $signalement->getCodeSuivi(), 'from' => $toRecipient] | ||
), | ||
]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters