forked from phth/agora
-
Notifications
You must be signed in to change notification settings - Fork 1
/
ext_localconf.php
executable file
·134 lines (122 loc) · 4 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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
<?php
if (!defined('TYPO3_MODE')) {
die('Access denied.');
}
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
'AgoraTeam.' . $_EXTKEY,
'Forum',
array(
'Forum' => 'list',
'Thread' => 'list, delete, edit, update, new, create',
'Post' => 'list, show, showHistory, delete, confirmDelete, edit, update, new, create',
'Rating' => 'rate',
'User' => 'addObservedThread, removeObservedThread, addFavoritePost, removeFavoritePost',
'Attachment' => 'download',
'Report' => 'new, report, confirm'
),
array(
'Forum' => 'list',
'Thread' => 'list, delete, edit, update, new, create',
'Post' => 'list, show, showHistory, delete, confirmDelete, edit, update, new, create',
'User' => 'addObservedThread, removeObservedThread, addFavoritePost, removeFavoritePost',
'Attachment' => 'download',
'Report' => 'new, report, confirm'
)
);
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
'AgoraTeam.' . $_EXTKEY,
'Widgets',
array(
'Post' => 'listLatest',
'Thread' => 'listLatest',
'User' => 'favoritePosts, observedThreads, removeObservedThread, removeFavoritePost'
),
array(
'Post' => 'listLatest',
'Thread' => 'listLatest',
'User' => 'favoritePosts, observedThreads, removeObservedThread, removeFavoritePost'
)
);
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
'AgoraTeam.' . $_EXTKEY,
'Forumpages',
array(
'User' => 'removeObservedThread, listObservedThreads',
),
array(
'User' => 'removeObservedThread, listObservedThreads',
)
);
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
'AgoraTeam.' . $_EXTKEY,
'Forumsearch',
array(
'Search' => 'list',
),
array(
'Search' => 'list',
)
);
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
'AgoraTeam.' . $_EXTKEY,
'Ajax',
array(
'Rating' => 'rate',
'Tag' => 'autocomplete, list',
),
array(
'Rating' => 'rate',
'Tag' => 'autocomplete, list',
)
);
// Add hook for Access-Writing
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass'][] =
AgoraTeam\Agora\Hooks\Tcemain::class;
// Add signal slots
$signalSlotDispatcher = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
\TYPO3\CMS\Extbase\SignalSlot\Dispatcher::class
);
$signalSlotDispatcher->connect(
'AgoraTeam\Agora\Controller\PostController',
'postCreated',
'AgoraTeam\Agora\Service\Action\ActionListener',
'onPostCreated'
);
$signalSlotDispatcher->connect(
'AgoraTeam\Agora\Controller\PostController',
'postUpdated',
'AgoraTeam\Agora\Service\Action\ActionListener',
'onPostUpdated'
);
$signalSlotDispatcher->connect(
'AgoraTeam\Agora\Controller\PostController',
'postDeleted',
'AgoraTeam\Agora\Service\Action\ActionListener',
'onPostDeleted'
);
$signalSlotDispatcher->connect(
'AgoraTeam\Agora\Controller\PostController',
'threadDeleted',
'AgoraTeam\Agora\Service\Action\ActionListener',
'onThreadDeleted'
);
$signalSlotDispatcher->connect(
'AgoraTeam\Agora\Controller\ThreadController',
'threadCreated',
'AgoraTeam\Agora\Service\Action\ActionListener',
'onThreadCreated'
);
$signalSlotDispatcher->connect(
'AgoraTeam\Agora\Controller\RatingController',
'rateConfirmed',
'AgoraTeam\Agora\Service\Action\ActionListener',
'onConfirmedRating'
);
// Add CommandController
if (isset($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['extbase']['commandControllers']) == false) {
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['extbase']['commandControllers'] = array();
}
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['extbase']['commandControllers'][] =
'AgoraTeam\\Agora\\Command\\ActionConverterCommandController';
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['extbase']['commandControllers'][] =
'AgoraTeam\\Agora\\Command\\NotificationMailerCommandController';