[FOLLOWUP][TASK] Move Media cObject and CTypes
[Packages/TYPO3.CMS.git] / typo3 / sysext / frontend / ext_localconf.php
1 <?php
2 defined('TYPO3_MODE') or die();
3
4 if (TYPO3_MODE === 'FE' && !isset($_REQUEST['eID'])) {
5 \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\SignalSlot\Dispatcher::class)->connect(
6 \TYPO3\CMS\Core\Resource\Index\MetaDataRepository::class,
7 'recordPostRetrieval',
8 \TYPO3\CMS\Frontend\Aspect\FileMetadataOverlayAspect::class,
9 'languageAndWorkspaceOverlay'
10 );
11 }
12
13 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScript(
14 'frontend',
15 'setup',
16 'config.extTarget = _top'
17 );
18
19
20 if (TYPO3_MODE === 'FE') {
21
22 // Register eID provider for showpic
23 $GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['tx_cms_showpic'] = 'EXT:frontend/Resources/PHP/Eid/ShowPic.php';
24 // Register eID provider for ExtDirect for the frontend
25 $GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['ExtDirect'] = 'EXT:frontend/Resources/PHP/Eid/ExtDirect.php';
26
27 // Register the core media wizard provider
28 \TYPO3\CMS\Frontend\MediaWizard\MediaWizardProviderManager::registerMediaWizardProvider(\TYPO3\CMS\Frontend\MediaWizard\MediaWizardProvider::class);
29
30 // Register all available content objects
31 $GLOBALS['TYPO3_CONF_VARS']['FE']['ContentObjects'] = array_merge($GLOBALS['TYPO3_CONF_VARS']['FE']['ContentObjects'], array(
32 'TEXT' => \TYPO3\CMS\Frontend\ContentObject\TextContentObject::class,
33 'CASE' => \TYPO3\CMS\Frontend\ContentObject\CaseContentObject::class,
34 'COBJ_ARRAY' => \TYPO3\CMS\Frontend\ContentObject\ContentObjectArrayContentObject::class,
35 'COA' => \TYPO3\CMS\Frontend\ContentObject\ContentObjectArrayContentObject::class,
36 'COA_INT' => \TYPO3\CMS\Frontend\ContentObject\ContentObjectArrayInternalContentObject::class,
37 'USER' => \TYPO3\CMS\Frontend\ContentObject\UserContentObject::class,
38 'USER_INT' => \TYPO3\CMS\Frontend\ContentObject\UserInternalContentObject::class,
39 'FILE' => \TYPO3\CMS\Frontend\ContentObject\FileContentObject::class,
40 'FILES' => \TYPO3\CMS\Frontend\ContentObject\FilesContentObject::class,
41 'IMAGE' => \TYPO3\CMS\Frontend\ContentObject\ImageContentObject::class,
42 'IMG_RESOURCE' => \TYPO3\CMS\Frontend\ContentObject\ImageResourceContentObject::class,
43 'CONTENT' => \TYPO3\CMS\Frontend\ContentObject\ContentContentObject::class,
44 'RECORDS' => \TYPO3\CMS\Frontend\ContentObject\RecordsContentObject::class,
45 'HMENU' => \TYPO3\CMS\Frontend\ContentObject\HierarchicalMenuContentObject::class,
46 'CASEFUNC' => \TYPO3\CMS\Frontend\ContentObject\CaseContentObject::class,
47 'LOAD_REGISTER' => \TYPO3\CMS\Frontend\ContentObject\LoadRegisterContentObject::class,
48 'RESTORE_REGISTER' => \TYPO3\CMS\Frontend\ContentObject\RestoreRegisterContentObject::class,
49 'TEMPLATE' => \TYPO3\CMS\Frontend\ContentObject\TemplateContentObject::class,
50 'FLUIDTEMPLATE' => \TYPO3\CMS\Frontend\ContentObject\FluidTemplateContentObject::class,
51 'SVG' => \TYPO3\CMS\Frontend\ContentObject\ScalableVectorGraphicsContentObject::class,
52 'EDITPANEL' => \TYPO3\CMS\Frontend\ContentObject\EditPanelContentObject::class
53 ));
54 }
55
56
57 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addUserTSConfig('
58 options.saveDocView = 1
59 options.saveDocNew = 1
60 options.saveDocNew.pages = 0
61 options.saveDocNew.sys_file = 0
62 options.disableDelete.sys_file = 1
63 TCAdefaults.tt_content.imagecols = 2
64 ');
65 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig('
66 mod.wizards.newContentElement {
67 renderMode = tabs
68 wizardItems {
69 common.header = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common
70 common.elements {
71 header {
72 icon = gfx/c_wiz/regular_header.gif
73 title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common_headerOnly_title
74 description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common_headerOnly_description
75 tt_content_defValues {
76 CType = header
77 }
78 }
79 text {
80 icon = gfx/c_wiz/regular_text.gif
81 title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common_regularText_title
82 description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common_regularText_description
83 tt_content_defValues {
84 CType = text
85 }
86 }
87 textpic {
88 icon = gfx/c_wiz/text_image_right.gif
89 title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common_textImage_title
90 description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common_textImage_description
91 tt_content_defValues {
92 CType = textpic
93 imageorient = 17
94 }
95 }
96 image {
97 icon = gfx/c_wiz/images_only.gif
98 title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common_imagesOnly_title
99 description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common_imagesOnly_description
100 tt_content_defValues {
101 CType = image
102 }
103 }
104 bullets {
105 icon = gfx/c_wiz/bullet_list.gif
106 title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common_bulletList_title
107 description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common_bulletList_description
108 tt_content_defValues {
109 CType = bullets
110 }
111 }
112 table {
113 icon = gfx/c_wiz/table.gif
114 title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common_table_title
115 description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:common_table_description
116 tt_content_defValues {
117 CType = table
118 }
119 }
120
121 }
122 common.show = header,text,textpic,image,bullets,table
123
124 special.header = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:special
125 special.elements {
126 uploads {
127 icon = gfx/c_wiz/filelinks.gif
128 title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:special_filelinks_title
129 description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:special_filelinks_description
130 tt_content_defValues {
131 CType = uploads
132 }
133 }
134 menu {
135 icon = gfx/c_wiz/sitemap2.gif
136 title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:special_menus_title
137 description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:special_menus_description
138 tt_content_defValues {
139 CType = menu
140 menu_type = 0
141 }
142 }
143 html {
144 icon = gfx/c_wiz/html.gif
145 title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:special_plainHTML_title
146 description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:special_plainHTML_description
147 tt_content_defValues {
148 CType = html
149 }
150 }
151 div {
152 icon = gfx/c_wiz/div.gif
153 title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:special_divider_title
154 description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:special_divider_description
155 tt_content_defValues {
156 CType = div
157 }
158 }
159 shortcut {
160 icon = gfx/c_wiz/shortcut.gif
161 title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:special_shortcut_title
162 description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:special_shortcut_description
163 tt_content_defValues {
164 CType = shortcut
165 }
166 }
167
168 }
169 special.show = uploads,menu,html,div,shortcut
170
171 # dummy placeholder for forms group
172 forms.header = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:forms
173
174 plugins.header = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:plugins
175 plugins.elements {
176 general {
177 icon = gfx/c_wiz/user_defined.gif
178 title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:plugins_general_title
179 description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:plugins_general_description
180 tt_content_defValues.CType = list
181 }
182 }
183 plugins.show = *
184 }
185 }
186
187 ');
188
189 // Registering hooks for the treelist cache
190 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass'][] = \TYPO3\CMS\Frontend\Hooks\TreelistCacheUpdateHooks::class;
191 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processCmdmapClass'][] = \TYPO3\CMS\Frontend\Hooks\TreelistCacheUpdateHooks::class;
192 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['moveRecordClass'][] = \TYPO3\CMS\Frontend\Hooks\TreelistCacheUpdateHooks::class;
193
194 // Register search keys
195 $GLOBALS['TYPO3_CONF_VARS']['SYS']['livesearch']['page'] = 'pages';
196 $GLOBALS['TYPO3_CONF_VARS']['SYS']['livesearch']['content'] = 'tt_content';
197
198 // Register hook to show preview info
199 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['hook_previewInfo']['cms'] = \TYPO3\CMS\Frontend\Hooks\FrontendHooks::class . '->hook_previewInfo';