forked from TYPO3-CMS/frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ext_localconf.php
107 lines (95 loc) · 4.39 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
<?php
declare(strict_types=1);
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
use TYPO3\CMS\Frontend\ContentObject\CaseContentObject;
use TYPO3\CMS\Frontend\ContentObject\ContentContentObject;
use TYPO3\CMS\Frontend\ContentObject\ContentObjectArrayContentObject;
use TYPO3\CMS\Frontend\ContentObject\ContentObjectArrayInternalContentObject;
use TYPO3\CMS\Frontend\ContentObject\EditPanelContentObject;
use TYPO3\CMS\Frontend\ContentObject\FilesContentObject;
use TYPO3\CMS\Frontend\ContentObject\FluidTemplateContentObject;
use TYPO3\CMS\Frontend\ContentObject\HierarchicalMenuContentObject;
use TYPO3\CMS\Frontend\ContentObject\ImageContentObject;
use TYPO3\CMS\Frontend\ContentObject\ImageResourceContentObject;
use TYPO3\CMS\Frontend\ContentObject\LoadRegisterContentObject;
use TYPO3\CMS\Frontend\ContentObject\RecordsContentObject;
use TYPO3\CMS\Frontend\ContentObject\RestoreRegisterContentObject;
use TYPO3\CMS\Frontend\ContentObject\ScalableVectorGraphicsContentObject;
use TYPO3\CMS\Frontend\ContentObject\TextContentObject;
use TYPO3\CMS\Frontend\ContentObject\UserContentObject;
use TYPO3\CMS\Frontend\ContentObject\UserInternalContentObject;
use TYPO3\CMS\Frontend\Controller\ShowImageController;
use TYPO3\CMS\Frontend\Hooks\TreelistCacheUpdateHooks;
defined('TYPO3') or die();
// Register all available content objects
$GLOBALS['TYPO3_CONF_VARS']['FE']['ContentObjects'] = array_merge($GLOBALS['TYPO3_CONF_VARS']['FE']['ContentObjects'], [
'TEXT' => TextContentObject::class,
'CASE' => CaseContentObject::class,
'COA' => ContentObjectArrayContentObject::class,
'COA_INT' => ContentObjectArrayInternalContentObject::class,
'USER' => UserContentObject::class,
'USER_INT' => UserInternalContentObject::class,
'FILES' => FilesContentObject::class,
'IMAGE' => ImageContentObject::class,
'IMG_RESOURCE' => ImageResourceContentObject::class,
'CONTENT' => ContentContentObject::class,
'RECORDS' => RecordsContentObject::class,
'HMENU' => HierarchicalMenuContentObject::class,
'LOAD_REGISTER' => LoadRegisterContentObject::class,
'RESTORE_REGISTER' => RestoreRegisterContentObject::class,
'FLUIDTEMPLATE' => FluidTemplateContentObject::class,
'SVG' => ScalableVectorGraphicsContentObject::class,
// @deprecated since v12: content object EDITPANEL will be removed in v12.
'EDITPANEL' => EditPanelContentObject::class,
]);
// Register eID provider for showpic
$GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['tx_cms_showpic'] = ShowImageController::class . '::processRequest';
ExtensionManagementUtility::addUserTSConfig('
options.saveDocView = 1
options.saveDocNew = 1
options.saveDocNew.pages = 0
options.saveDocNew.sys_file = 0
options.saveDocNew.sys_file_metadata = 0
options.disableDelete.sys_file = 1
');
ExtensionManagementUtility::addTypoScriptSetup(
'
# Content selection
styles.content.get = CONTENT
styles.content.get {
table = tt_content
select {
orderBy = sorting
where = {#colPos}=0
}
}
# Content element rendering
tt_content = CASE
tt_content {
key {
field = CType
}
default = TEXT
default {
field = CType
htmlSpecialChars = 1
wrap = <p style="background-color: yellow; padding: 0.5em 1em;"><strong>ERROR:</strong> Content Element with uid "{field:uid}" and type "|" has no rendering definition!</p>
wrap.insertData = 1
}
}
'
);
// Registering hooks for the tree list cache
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass'][] = TreelistCacheUpdateHooks::class;
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processCmdmapClass'][] = TreelistCacheUpdateHooks::class;
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['moveRecordClass'][] = TreelistCacheUpdateHooks::class;
// Register search key shortcuts
$GLOBALS['TYPO3_CONF_VARS']['SYS']['livesearch']['content'] = 'tt_content';
// Include new content elements to modWizards
ExtensionManagementUtility::addPageTSConfig(
"@import 'EXT:frontend/Configuration/TsConfig/Page/Mod/Wizards/NewContentElement.tsconfig'"
);
// Include FormEngine adjustments
ExtensionManagementUtility::addPageTSConfig(
"@import 'EXT:frontend/Configuration/TsConfig/Page/TCEFORM.tsconfig'"
);