This repository has been archived by the owner on Oct 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathext_tables.php
52 lines (44 loc) · 1.94 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
<?php
/* | This extension is made for TYPO3 CMS and is licensed
* | under GNU General Public License.
* |
* | (c) 2011-2022 Armin Vieweg <[email protected]>
* | 2015 Dennis Roemmich <[email protected]>
* | 2016-2017 Christian Wolfram <[email protected]>
*/
if (!defined('TYPO3_MODE')) {
die('Access denied.');
}
$boot = function ($extensionKey) {
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
$extensionKey,
'Pi1',
'LLL:EXT:pw_comments/Resources/Private/Language/locallang_db.xlf:plugin.title'
);
$extensionName = \TYPO3\CMS\Core\Utility\GeneralUtility::underscoredToUpperCamelCase($extensionKey);
$pluginSignature = strtolower($extensionName) . '_pi1';
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist'][$pluginSignature] = 'pi_flexform';
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_excludelist'][$pluginSignature] =
'select_key,pages,recursive';
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue(
$pluginSignature,
'FILE:EXT:' . $extensionKey . '/Configuration/FlexForms/Plugin.xml'
);
// Add typoscript static includes
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile(
$extensionKey,
'Configuration/TypoScript',
'pw_comments Main Static Template (required)'
);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile(
$extensionKey,
'Configuration/TypoScript/Styling',
'pw_comments Optional Styles'
);
// TCA options
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_pwcomments_domain_model_comment');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_pwcomments_domain_model_vote');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToInsertRecords('tx_pwcomments_domain_model_comment');
};
$boot('pw_comments');
unset($boot);