PSR-14 EventDispatcher
Overview
Powermail offers a lot of events (modern pendant to hooks) to extend functions and properties with your extension. Please report to https://github.com/einpraegsam/powermail/issues if you need a new event anywhere.
| Location | Event | Description |
|---|---|---|
In2code\ | In2code\ | Add your own serverside Validation |
In2code\ | In2code\ | Listeners are called before the form is rendered |
In2code\ | In2code\ | Listeners are called before the mail and answers are persisted and before the emails are sent |
In2code\ | In2code\ | Listeners are called directly after the mail was persisted |
In2code\ | In2code\ | Listeners are called after the create message was rendered |
In2code\ | In2code\ | It is possible to deny saving of the mail with this event |
In2code\ | In2code\ | Listeners are called before the confirmation view is rendered |
In2code\ | In2code\ | Listeners are called before the optin confirmation view is rendered (only if Double-Opt-In is in use) |
In2code\ | In2code\ | Change Settings from Flexform or TypoScript before Action is called |
In2code\ | In2code\ | Prefill fields by your own magic |
In2code\ | In2code\ | Prefill multiple fields by your own magic |
In2code\ | In2code\ | Manipulate receiver emails short before the mails will be send |
In2code\ | In2code\ | Manipulate receiver name when getting it |
In2code\ | In2code\ | Change the message object before sending |
In2code\ | In2code\ | Manipulate standaloneView-object before the mail object will be rendered |
In2code\ | In2code\ | Manipulate given receiver email addresses |
In2code\ | In2code\ | Manipulate given receiver name |
In2code\ | In2code\ | Manipulate given sender email addresses |
In2code\ | In2code\ | Manipulate given sender name |
In2code\ | In2code\ | Change files from upload-fields before they will be validated, stored and send |
In2code\ | In2code\ | Change files array from upload-fields whenever files will be read |
In2code\ | In2code\ | Change path and filename of a single file for uploading, attaching to email or something else |
In2code\ | In2code\ | Useful if you want to hook into additionalAttributes and set your own attributes to fields |
In2code\ | In2code\ | If you want to register your own markers use this event |
How to add a listener
There is a very good documentation how to work with EventDispatcher in TYPO3: https://docs.typo3.org/m/typo3/reference-coreapi/main/en-us/ApiOverview/Events/EventDispatcher/Index.html
Example Code
Look at https://github.com/einpraegsam/powermailextended for an example extension. This extension allows you to:
- Extend powermail with a complete new field type (Just a small "Show Text" example)
- Extend powermail with an own Php and JavaScript validator (ZIP validator - number has to start with 8)
- Extend powermail with new field properties (readonly and prepend text from Textarea)
- Extend powermail with an example SignalSlot (see ext_localconf.php and EXT:powermailextended/Classes/Controller/FormController.php)