-
Notifications
You must be signed in to change notification settings - Fork 6
/
ext_localconf.php
76 lines (69 loc) · 3.54 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<?php
declare(strict_types=1);
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
use TYPO3\CMS\Extbase\Utility\ExtensionUtility;
defined('TYPO3') || die();
ExtensionUtility::configurePlugin(
'NewsletterSubscribe',
'Subscribe',
[
\Zwo3\NewsletterSubscribe\Controller\SubscribeController::class => 'showForm, createConfirmation, unsubscribe, undosubscribe, doConfirm, createUnsubscribeMail',
],
// non-cacheable actions
[
\Zwo3\NewsletterSubscribe\Controller\SubscribeController::class => 'showForm, createConfirmation, unsubscribe, undosubscribe, doConfirm, createUnsubscribeMail',
]
);
ExtensionUtility::configurePlugin(
'NewsletterSubscribe',
'Unsubscribe',
[
\Zwo3\NewsletterSubscribe\Controller\SubscribeController::class => 'showUnsubscribeForm, unsubscribe, undosubscribe, createUnsubscribeMail',
],
// non-cacheable actions
[
\Zwo3\NewsletterSubscribe\Controller\SubscribeController::class => 'showUnsubscribeForm, unsubscribe, undosubscribe, createUnsubscribeMail',
]
);
// wizards
ExtensionManagementUtility::addPageTSConfig(
'mod {
wizards.newContentElement.wizardItems.plugins {
elements {
subscribe {
iconIdentifier = zwo3_newslettersubscribe-plugin-subscribe
title = LLL:EXT:newsletter_subscribe/Resources/Private/Language/locallang_db.xlf:tx_zwo3_newslettersubscribe_subscribe.name
description = LLL:EXT:newsletter_subscribe/Resources/Private/Language/locallang_db.xlf:tx_zwo3_newslettersubscribe_subscribe.description
tt_content_defValues {
CType = list
list_type = newslettersubscribe_subscribe
}
}
unsubscribe {
iconIdentifier = zwo3_newslettersubscribe-plugin-unsubscribe
title = LLL:EXT:newsletter_subscribe/Resources/Private/Language/locallang_db.xlf:tx_zwo3_newslettersubscribe_unsubscribe.name
description = LLL:EXT:newsletter_subscribe/Resources/Private/Language/locallang_db.xlf:tx_zwo3_newslettersubscribe_unsubscribe.description
tt_content_defValues {
CType = list
list_type = newslettersubscribe_unsubscribe
}
}
}
show = *
}
}'
);
foreach ([
'tx_newslettersubscribe_subscribe[subscriptionHash]',
'tx_newslettersubscribe_subscribe[uid]',
'tx_newslettersubscribe_unsubscribe[subscriptionHash]',
'tx_newslettersubscribe_unsubscribe[uid]'
] as $parameter) {
$GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash']['excludedParameters'][] = $parameter;
}
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks'][\Zwo3\NewsletterSubscribe\SchedulerTask\DeleteUnvalidatedSubscribersTask::class] = [
'extension' => 'newsletter_subscribe',
'title' => 'LLL:EXT:newsletter_subscribe/Resources/Private/Language/locallang.xlf:schedulerDeleteUnvalidated.name',
'description' => 'LLL:EXT:newsletter_subscribe/Resources/Private/Language/locallang.xlf:schedulerDeleteUnvalidated.description',
'additionalFields' => \Zwo3\NewsletterSubscribe\SchedulerTask\DeleteUnvalidatedSubscribersTaskAdditionalFieldProvider::class
];