forked from fabarea/messenger
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ext_localconf.php
65 lines (53 loc) · 2.33 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
<?php
use Fab\Messenger\Controller\MessageDisplayController;
defined('TYPO3_MODE') || die('Access denied.');
call_user_func(
function () {
$configuration = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
\TYPO3\CMS\Core\Configuration\ExtensionConfiguration::class
)->get('messenger');
if (!isset($configuration['autoload_typoscript']) || (bool)$configuration['autoload_typoscript']) {
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScript(
'messenger',
'constants',
'<INCLUDE_TYPOSCRIPT: source="FILE:EXT:messenger/Configuration/TypoScript/constants.txt">'
);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScript(
'messenger',
'setup',
'<INCLUDE_TYPOSCRIPT: source="FILE:EXT:messenger/Configuration/TypoScript/setup.txt">'
);
}
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
'messenger',
'Pi1',
[
'MessageRenderer' => 'render',
],
// non-cacheable actions
[
'MessageRenderer' => 'render',
]
);
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
'messenger',
'MessageDisplay',
[
MessageDisplayController::class => 'show',
],
// non-cacheable actions
[
MessageDisplayController::class => 'show',
]
);
// eID for resolving Frontend URL in the context of the Backend.
$GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['messenger'] = \Fab\Messenger\PagePath\Resolver::class . '::resolveUrl';
// Add caching framework garbage collection task
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks'][\Fab\Messenger\Task\MessengerDequeueTask::class] = [
'extension' => 'messenger',
'title' => 'LLL:EXT:messenger/Resources/Private/Language/locallang.xlf:scheduler.dequeue.name',
'description' => 'LLL:EXT:messenger/Resources/Private/Language/locallang.xlf:scheduler.dequeue.description',
'additionalFields' => \Fab\Messenger\Task\MessengerDequeueFieldProvider::class
];
}
);