-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathext_localconf.php
104 lines (96 loc) · 4.42 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
<?php
defined('TYPO3') || die('Access denied.');
call_user_func(
function () {
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
'Laposta',
'Subscribe',
[\Proudnerds\Laposta\Controller\SubscriptionlistController::class => 'subscribe, rest'],
[\Proudnerds\Laposta\Controller\SubscriptionlistController::class => 'subscribe, rest']
);
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
'Laposta',
'Unsubscribe',
[\Proudnerds\Laposta\Controller\SubscriptionlistController::class => 'unsubscribe, rest'],
[\Proudnerds\Laposta\Controller\SubscriptionlistController::class => 'unsubscribe, rest']
);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig(
'mod {
wizards.newContentElement.wizardItems.plugins {
elements {
subscribe {
iconIdentifier = laposta-plugin-subscribe
title = LLL:EXT:laposta/Resources/Private/Language/locallang_db.xlf:tx_laposta_subscribe.name
description = LLL:EXT:laposta/Resources/Private/Language/locallang_db.xlf:tx_laposta_subscribe.description
tt_content_defValues {
CType = list
list_type = laposta_subscribe
}
}
}
show = *
}
}'
);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig(
'mod {
wizards.newContentElement.wizardItems.plugins {
elements {
unsubscribe {
iconIdentifier = laposta-plugin-subscribe
title = LLL:EXT:laposta/Resources/Private/Language/locallang_db.xlf:tx_laposta_unsubscribe.name
description = LLL:EXT:laposta/Resources/Private/Language/locallang_db.xlf:tx_laposta_unsubscribe.description
tt_content_defValues {
CType = list
list_type = laposta_unsubscribe
}
}
}
show = *
}
}'
);
$iconRegistry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Imaging\IconRegistry::class);
$iconRegistry->registerIcon(
'laposta-plugin-subscribe',
\TYPO3\CMS\Core\Imaging\IconProvider\BitmapIconProvider::class,
['source' => 'EXT:laposta/Resources/Public/Icons/laposta.png']
);
$projectRootPath = TYPO3\CMS\Core\Utility\GeneralUtility::fixWindowsFilePath(getenv('TYPO3_PATH_APP'));
$logFilePath = $projectRootPath . '/var/log/Laposta.log';
$GLOBALS['TYPO3_CONF_VARS']['LOG']['Proudnerds']['Laposta']['Controller']['SubscriptionlistController'] = [
'writerConfiguration' => [
\TYPO3\CMS\Core\Log\LogLevel::INFO => [
'TYPO3\\CMS\\Core\\Log\\Writer\\FileWriter' => [
'logFile' => $logFilePath
]
],
\TYPO3\CMS\Core\Log\LogLevel::NOTICE => [
'TYPO3\\CMS\\Core\\Log\\Writer\\FileWriter' => [
'logFile' => $logFilePath
]
],
\TYPO3\CMS\Core\Log\LogLevel::WARNING => [
'TYPO3\\CMS\\Core\\Log\\Writer\\FileWriter' => [
'logFile' => $logFilePath
]
],
\TYPO3\CMS\Core\Log\LogLevel::ERROR => [
'TYPO3\\CMS\\Core\\Log\\Writer\\FileWriter' => [
'logFile' => $logFilePath
]
],
\TYPO3\CMS\Core\Log\LogLevel::CRITICAL => [
'TYPO3\\CMS\\Core\\Log\\Writer\\FileWriter' => [
'logFile' => $logFilePath
]
],
\TYPO3\CMS\Core\Log\LogLevel::ALERT => [
'TYPO3\\CMS\\Core\\Log\\Writer\\FileWriter' => [
'logFile' => $logFilePath
]
],
]
];
}
);