-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEATURE] Adds Event before sending out testmail #205
Conversation
This event can be used to deactivate the internal sending of test emails and implement your own logic, e.g. sending test newsletters via a separate queue. Relates to: https://projekte.in2code.de/issues/61246
This event is executed before the body text for the individual newsletter is processed. The event can be used to change or reset the body text that is used for parsing. Relates to: https://projekte.in2code.de/issues/61356
7f9665f
to
e6d663a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The actual changes around the two new events look good to me.
The "corrected" not passing values to Fluid should still be discussed.
]); | ||
if ($user !== null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, without $user
the variable logs
would be not set/exist in Fluid. Currently, Fluid is tolerating undefined variables. As far as I know, this should be changed soon.
Passing an (empty) array - as before - would be cleaner.
The whole block of assignments is useless with $user===null
... Why the distinction/decision that only one variable is not assigned?
declare(strict_types=1); | ||
namespace Vendor\Extension\EventListener; | ||
|
||
use In2code\Luxletter\Events\AfterTestMailButtonClickedEvent; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Import AfterTestMailButtonClickedEvent
is not used in this snippet.
Thx, I just pushed a new commit based on this PR. Some small changes are implemented in b16c18f |
The first event can be used to deactivate the internal sending of test emails and implement your own logic, e.g. sending test newsletters via a separate queue.
Relates to: https://projekte.in2code.de/issues/61246
The second event is executed before the body text for the individual newsletter is processed. The event can be used to change or reset the body text that is used for parsing.
Relates to: https://projekte.in2code.de/issues/61356