forked from Zillion01/jpfaq
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathext_localconf.php
executable file
·113 lines (99 loc) · 3.76 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
<?php
defined('TYPO3_MODE') || die('Access denied.');
call_user_func(
function ($extKey) {
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
'Jp.Jpfaq',
'Faq',
[
'Question' => 'list, helpfulness',
'Questioncomment' => 'comment, addComment',
'Categorycomment' => 'comment, addComment'
],
// non-cacheable actions
[
'Question' => 'helpfulness',
'Questioncomment' => 'comment, addComment',
'Categorycomment' => 'comment, addComment'
]
);
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
'Jp.Jpfaq',
'SingleView',
[
'Question' => 'detail,helpfulness',
'Questioncomment' => 'comment, addComment',
'Categorycomment' => 'comment, addComment'
],
// non-cacheable actions
[
'Question' => 'helpfulness',
'Questioncomment' => 'comment, addComment',
'Categorycomment' => 'comment, addComment'
]
);
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
'Jp.Jpfaq',
'SingleViewCategory',
[
'Question' => 'categoryDetail,helpfulness',
'Questioncomment' => 'comment, addComment',
'Categorycomment' => 'comment, addComment'
],
// non-cacheable actions
[
'Question' => 'helpfulness',
'Questioncomment' => 'comment, addComment',
'Categorycomment' => 'comment, addComment'
]
);
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
'Jp.Jpfaq',
'Search',
[
'Search' => 'search'
]
);
},
'jpfaq'
);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig('<INCLUDE_TYPOSCRIPT: source="FILE: EXT:jpfaq/Configuration/TsConfig/includePageTSconfig.tsconfig">');
/**
* Icon registry
*/
if (TYPO3_MODE === 'BE') {
$iconRegistry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(TYPO3\CMS\Core\Imaging\IconRegistry::class);
$iconPath = 'EXT:jpfaq/Resources/Public/Icons/';
$svgIcons = [
'ext-jpfaq-wizard-icon' => $iconPath . 'ce_wiz.svg',
'tx_jpfaq_domain_model_questioncomment' => $iconPath . 'tx_jpfaq_domain_model_questioncomment.svg',
'tx_jpfaq_domain_model_categorycomment' => $iconPath . 'tx_jpfaq_domain_model_categorycomment.svg'
];
foreach ($svgIcons as $identifier => $path) {
$iconRegistry->registerIcon(
$identifier,
\TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider::class,
['source' => $path]
);
}
$bitmapIcons = [
'tx_jpfaq_domain_model_category' => $iconPath . 'tx_jpfaq_domain_model_category.gif',
'tx_jpfaq_domain_model_question' => $iconPath . 'tx_jpfaq_domain_model_question.gif'
];
foreach ($bitmapIcons as $identifier => $path) {
$iconRegistry->registerIcon(
$identifier,
\TYPO3\CMS\Core\Imaging\IconProvider\BitmapIconProvider::class,
['source' => $path]
);
}
}
$GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['jpfaq_feedback'] =
\Jp\Jpfaq\Controller\AjaxFeedbackController::class . '::processRequest';
// Example Signal Slot registering
//$signalSlotDispatcher->connect(
// \Jp\Jpfaq\Controller\QuestionController::class, // Signal class name
// 'NewFaqComment', // Signal name
// 'bla::class', // Slot class name
// 'yourslot' // Slot name
//);