-
Notifications
You must be signed in to change notification settings - Fork 9
/
ext_tables.php
64 lines (56 loc) · 2.48 KB
/
ext_tables.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
<?php
defined('TYPO3_MODE') || die('Access denied.');
call_user_func(
function () {
// Registre hook for plugin preview
// @codingStandardsIgnoreStart
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/class.tx_cms_layout.php']['list_type_Info']['pxasurvey_survey']['pxa_survey'] =
\Pixelant\PxaSurvey\Hooks\ListTypeInfoPreviewHook::class . '->getExtensionSummary';
// @codingStandardsIgnoreEnd
if (TYPO3_MODE === 'BE') {
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerModule(
'Pixelant.PxaSurvey',
'web', // Make module a submodule of 'web'
'surveyanalysis', // Submodule key
'', // Position
[
'SurveyAnalysis' => 'main, seeAnalysis, exportCsv',
],
[
'access' => 'user,group',
'icon' => 'EXT:pxa_survey/Resources/Public/Icons/user_mod_surveyanalysis.svg',
'labels' => 'LLL:EXT:pxa_survey/Resources/Private/Language/locallang_surveyanalysis.xlf',
]
);
$icons = [
'ext-pxa-survey-wizard-icon' => 'user_plugin_survey.svg',
];
/** @var \TYPO3\CMS\Core\Imaging\IconRegistry $iconRegistry */
$iconRegistry = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
\TYPO3\CMS\Core\Imaging\IconRegistry::class
);
foreach ($icons as $identifier => $path) {
$iconRegistry->registerIcon(
$identifier,
\TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider::class,
['source' => 'EXT:pxa_survey/Resources/Public/Icons/' . $path]
);
}
}
$tables = [
'tx_pxasurvey_domain_model_survey',
'tx_pxasurvey_domain_model_question',
'tx_pxasurvey_domain_model_answer'
];
foreach ($tables as $table) {
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr(
$table,
'EXT:pxa_survey/Resources/Private/Language/locallang_csh_' . $table . '.xlf'
);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages($table);
}
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages(
'tx_pxasurvey_domain_model_useranswer'
);
}
);