-
Notifications
You must be signed in to change notification settings - Fork 1
/
ext_localconf.php
89 lines (78 loc) · 2.51 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
<?php
defined('TYPO3') or die();
use Mediadreams\MdUnreadnews\Controller\UnreadnewsController;
use Mediadreams\MdUnreadnews\Hooks\TCEmainHook;
use \TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Utility\ExtensionUtility;
call_user_func(
function () {
ExtensionUtility::configurePlugin(
'MdUnreadnews',
'Unread',
[
UnreadnewsController::class => 'list'
],
// non-cacheable actions
[
UnreadnewsController::class => 'list'
]
);
ExtensionUtility::configurePlugin(
'MdUnreadnews',
'UnreadCount',
[
UnreadnewsController::class => 'allUnreadCount'
],
[
UnreadnewsController::class => 'allUnreadCount'
]
);
ExtensionUtility::configurePlugin(
'MdUnreadnews',
'UnreadCategory',
[
UnreadnewsController::class => 'categoryCount'
],
[
UnreadnewsController::class => 'categoryCount'
]
);
ExtensionUtility::configurePlugin(
'MdUnreadnews',
'UnreadIsUnread',
[
UnreadnewsController::class => 'isUnread'
],
[
UnreadnewsController::class => 'isUnread'
]
);
ExtensionUtility::configurePlugin(
'MdUnreadnews',
'UnreadRemove',
[
UnreadnewsController::class => 'removeUnread'
],
[
UnreadnewsController::class => 'removeUnread'
]
);
$iconRegistry = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Imaging\IconRegistry::class);
$iconRegistry->registerIcon(
'md_unreadnews-plugin-unread',
\TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider::class,
['source' => 'EXT:md_unreadnews/Resources/Public/Icons/user_plugin_unread.svg']
);
// hook into saving process of news records
$GLOBALS['TYPO3_CONF_VARS']
['SC_OPTIONS']
['t3lib/class.t3lib_tcemain.php']
['processDatamapClass']
['md_unreadnews'] = TCEmainHook::class;
$GLOBALS['TYPO3_CONF_VARS']
['SC_OPTIONS']
['t3lib/class.t3lib_tcemain.php']
['processCmdmapClass']
['md_unreadnews_delete'] = TCEmainHook::class;
}
);