-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathext_localconf.php
43 lines (38 loc) · 1.64 KB
/
ext_localconf.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?php
call_user_func(function () {
# Hooks for TYPO3 FE manipulation
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['contentPostProc-all'][] =
'EXT:email2powermail/Classes/Hooks/ContentPostProc.php:' .
'&In2code\\Email2powermail\\Hooks\\ContentPostProc->manipulateOutput';
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['contentPostProc-output'][] =
'EXT:email2powermail/Classes/Hooks/ContentPostProc.php:' .
'&In2code\\Email2powermail\\Hooks\\ContentPostProc->manipulateOutput';
# Use signals
$signalSlotDispatcher = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
\TYPO3\CMS\Extbase\SignalSlot\Dispatcher::class
);
// Manipulate email before sending example
$signalSlotDispatcher->connect(
\In2code\Powermail\Domain\Service\Mail\ReceiverMailReceiverPropertiesService::class,
'setReceiverEmails',
\In2code\Email2powermail\Slots\ReceiverEmailService::class,
'setReceiverEmails',
false
);
// Manipulate name before sending example
$signalSlotDispatcher->connect(
\In2code\Powermail\Domain\Service\Mail\ReceiverMailReceiverPropertiesService::class,
'getReceiverName',
\In2code\Email2powermail\Slots\ReceiverEmailService::class,
'getReceiverName',
false
);
// Add own markers
$signalSlotDispatcher->connect(
\In2code\Powermail\Domain\Repository\MailRepository::class,
'getVariablesWithMarkersFromMail',
\In2code\Email2powermail\Slots\MarkerSlot::class,
'getVariablesWithMarkersFromMail',
false
);
});