This repository has been archived by the owner on Mar 5, 2020. It is now read-only.
forked from fnagel/beautyofcode
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ext_tables.php
72 lines (61 loc) · 3.11 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
65
66
67
68
69
70
71
72
<?php
if (!defined('TYPO3_MODE')) {
die('Access denied.');
}
call_user_func(function ($packageKey) {
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile(
$packageKey,
'Configuration/TypoScript/SyntaxHighlighter/',
'beautyOfCode (SyntaxHighlighter)'
);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile(
$packageKey,
'Configuration/TypoScript/Prism/',
'beautyOfCode (Prism)'
);
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig(
'<INCLUDE_TYPOSCRIPT: source="FILE:EXT:' . $packageKey . '/Configuration/TypoScript/pageTsConfig.ts">'
);
$GLOBALS['TCA']['tt_content']['columns']['CType']['config']['items'][] = array(
'LLL:EXT:beautyofcode/Resources/Private/Language/locallang_db.xlf:content_element.beautyofcode_contentrenderer',
'beautyofcode_contentrenderer',
'content-special-html',
);
$GLOBALS['TCA']['tt_content']['types']['beautyofcode_contentrenderer']['showitem'] = '
--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xml:palette.general;general,
--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.header;header,
--div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.plugin,
pi_flexform,
bodytext;LLL:EXT:beautyofcode/Resources/Private/Language/locallang_db.xlf:code,
--div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.appearance,
--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.frames;frames,
--div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.access,
--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.visibility;visibility,
--palette--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:palette.access;access,
--div--;LLL:EXT:frontend/Resources/Private/Language/locallang_ttc.xlf:tabs.extended
';
$configuration = $GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['beautyofcode'];
if (is_string($configuration)) {
$configuration = (array)@unserialize($configuration);
} else {
$configuration = array();
}
if (isset($configuration['enable_t3editor']) && $configuration['enable_t3editor'] == 1 &&
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('t3editor')
) {
$GLOBALS['TCA']['tt_content']['types']['beautyofcode_contentrenderer']['columnsOverrides'] = array(
'bodytext' => array(
'config' => array(
'format' => 'mixed',
'renderType' => 't3editor',
),
),
);
};
$GLOBALS['TCA']['tt_content']['types']['list']['subtypes_addlist']['beautyofcode_contentrenderer'] = 'pi_flexform';
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue(
'*',
'FILE:EXT:' . $packageKey. '/Configuration/Flexform/ContentRenderer.xml',
'beautyofcode_contentrenderer'
);
}, $_EXTKEY);