forked from Zillion01/jpfaq
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ext_localconf.php
67 lines (57 loc) · 2.47 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
<?php
defined('TYPO3') || die('Access denied.');
$boot = static function (): void {
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
'Jpfaq',
'Faq',
[
\Jp\Jpfaq\Controller\QuestionController::class => 'list, helpfulness',
\Jp\Jpfaq\Controller\QuestioncommentController::class => 'comment, addComment',
\Jp\Jpfaq\Controller\CategorycommentController::class => 'comment, addComment'
],
// non-cacheable actions
[
\Jp\Jpfaq\Controller\QuestionController::class => 'helpfulness',
\Jp\Jpfaq\Controller\QuestioncommentController::class => 'comment, addComment',
\Jp\Jpfaq\Controller\CategorycommentController::class => 'comment, addComment'
]
);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig('<INCLUDE_TYPOSCRIPT: source="FILE: EXT:jpfaq/Configuration/TsConfig/includePageTSconfig.tsconfig">');
/**
* Icon registry
*/
$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]
);
}
// 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
//);
};
$boot();
unset($boot);