feat: offer a newsletter opt-in for the other participants
addresses #869etn6c5
This commit is contained in:
1 parent
96b7b3f451
commit
876e69e62c
10 files changed
+598
-71
No files matched your search
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace App\Enum;
|
||||
|
||||
/**
|
||||
* Who asked for a double opt-in mail — the recipient themselves, or the applicant of a
|
||||
* booking they are travelling on. Only the wording of the confirmation mail depends on
|
||||
* this: a third-party sign-up has to name who requested it and make clear that nothing
|
||||
* is subscribed without the recipient's own click. Confirmation itself stays
|
||||
* context-agnostic, so the value never has to be persisted.
|
||||
*/
|
||||
enum NewsletterOptInContext: string
|
||||
{
|
||||
case Own = 'own';
|
||||
case Companion = 'companion';
|
||||
|
||||
public function subject(): string
|
||||
{
|
||||
return match ($this) {
|
||||
self::Own => 'Deine Anmeldung zum E&P Newsletter',
|
||||
self::Companion => 'Möchtest du den E&P Newsletter erhalten?',
|
||||
};
|
||||
}
|
||||
|
||||
public function template(): string
|
||||
{
|
||||
return match ($this) {
|
||||
self::Own => 'email/newsletter_opt_in.html.twig',
|
||||
self::Companion => 'email/newsletter_opt_in_companion.html.twig',
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user