‪TYPO3CMS  9.5
ext_localconf.php
Go to the documentation of this file.
1 <?php
2 defined('TYPO3_MODE') or die();
3 
4 \‪TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\‪TYPO3\CMS\‪Extbase\SignalSlot\Dispatcher::class)->connect(
5  \‪TYPO3\CMS\Core\Resource\Index\MetaDataRepository::class,
6  'recordPostRetrieval',
7  \‪TYPO3\CMS\Frontend\Aspect\FileMetadataOverlayAspect::class,
8  'languageAndWorkspaceOverlay'
9 );
10 
11 // Register all available content objects
12 ‪$GLOBALS['TYPO3_CONF_VARS']['FE']['ContentObjects'] = array_merge(‪$GLOBALS['TYPO3_CONF_VARS']['FE']['ContentObjects'], [
13  'TEXT' => \‪TYPO3\CMS\Frontend\ContentObject\TextContentObject::class,
14  'CASE' => \‪TYPO3\CMS\Frontend\ContentObject\CaseContentObject::class,
15  'COA' => \‪TYPO3\CMS\Frontend\ContentObject\ContentObjectArrayContentObject::class,
16  'COA_INT' => \‪TYPO3\CMS\Frontend\ContentObject\ContentObjectArrayInternalContentObject::class,
17  'USER' => \‪TYPO3\CMS\Frontend\ContentObject\UserContentObject::class,
18  'USER_INT' => \‪TYPO3\CMS\Frontend\ContentObject\UserInternalContentObject::class,
19  'FILE' => \‪TYPO3\CMS\Frontend\ContentObject\FileContentObject::class,
20  'FILES' => \‪TYPO3\CMS\Frontend\ContentObject\FilesContentObject::class,
21  'IMAGE' => \‪TYPO3\CMS\Frontend\ContentObject\ImageContentObject::class,
22  'IMG_RESOURCE' => \‪TYPO3\CMS\Frontend\ContentObject\ImageResourceContentObject::class,
23  'CONTENT' => \‪TYPO3\CMS\Frontend\ContentObject\ContentContentObject::class,
24  'RECORDS' => \‪TYPO3\CMS\Frontend\ContentObject\RecordsContentObject::class,
25  'HMENU' => \‪TYPO3\CMS\Frontend\ContentObject\HierarchicalMenuContentObject::class,
26  'LOAD_REGISTER' => \‪TYPO3\CMS\Frontend\ContentObject\LoadRegisterContentObject::class,
27  'RESTORE_REGISTER' => \‪TYPO3\CMS\Frontend\ContentObject\RestoreRegisterContentObject::class,
28  'TEMPLATE' => \‪TYPO3\CMS\Frontend\ContentObject\TemplateContentObject::class,
29  'FLUIDTEMPLATE' => \‪TYPO3\CMS\Frontend\ContentObject\FluidTemplateContentObject::class,
30  'SVG' => \‪TYPO3\CMS\Frontend\ContentObject\ScalableVectorGraphicsContentObject::class,
31  'EDITPANEL' => \‪TYPO3\CMS\Frontend\ContentObject\EditPanelContentObject::class
32 ]);
33 
34 // Register eID provider for showpic
35 ‪$GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['tx_cms_showpic'] = \‪TYPO3\CMS\Frontend\Controller\ShowImageController::class . '::processRequest';
36 
37 \‪TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addUserTSConfig('
38  options.saveDocView = 1
39  options.saveDocNew = 1
40  options.saveDocNew.pages = 0
41  options.saveDocNew.sys_file = 0
42  options.saveDocNew.sys_file_metadata = 0
43  options.disableDelete.sys_file = 1
44 ');
45 
46 \‪TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScriptSetup(
47  '
48 # Content selection
49 styles.content.get = CONTENT
50 styles.content.get {
51  table = tt_content
52  select {
53  orderBy = sorting
54  where = {#colPos}=0
55  }
56 }
57 
58 
59 # Content element rendering
60 tt_content = CASE
61 tt_content {
62  key {
63  field = CType
64  }
65  default = TEXT
66  default {
67  field = CType
68  htmlSpecialChars = 1
69  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>
70  wrap.insertData = 1
71  }
72 }
73  '
74 );
75 
76 // Registering hooks for the tree list cache
77 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass'][] = \TYPO3\CMS\Frontend\Hooks\TreelistCacheUpdateHooks::class;
78 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processCmdmapClass'][] = \TYPO3\CMS\Frontend\Hooks\TreelistCacheUpdateHooks::class;
79 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['moveRecordClass'][] = \TYPO3\CMS\Frontend\Hooks\TreelistCacheUpdateHooks::class;
80 
81 // Register hook to show preview info
82 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['hook_eofe']['preview-message'] = \TYPO3\CMS\Frontend\Hooks\FrontendHooks::class . '->displayPreviewInfoMessage';
83 
84 // Register for hooks to show preview of tt_content elements in page module
85 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/class.tx_cms_layout.php']['tt_content_drawItem']['image'] =
86  \TYPO3\CMS\Frontend\Hooks\PageLayoutView\ImagePreviewRenderer::class;
87 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/class.tx_cms_layout.php']['tt_content_drawItem']['textpic'] =
88  \TYPO3\CMS\Frontend\Hooks\PageLayoutView\TextpicPreviewRenderer::class;
89 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/class.tx_cms_layout.php']['tt_content_drawItem']['text'] =
90  \TYPO3\CMS\Frontend\Hooks\PageLayoutView\TextPreviewRenderer::class;
91 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/class.tx_cms_layout.php']['tt_content_drawItem']['textmedia'] =
92  \TYPO3\CMS\Frontend\Hooks\PageLayoutView\TextmediaPreviewRenderer::class;
93 
94 // Register search key shortcuts
95 $GLOBALS['TYPO3_CONF_VARS']['SYS']['livesearch']['content'] = 'tt_content';
96 
97 \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Imaging\IconRegistry::class)
98  ->registerIcon(
99  'wizard-backendlayout',
100  \TYPO3\CMS\Core\Imaging\IconProvider\FontawesomeIconProvider::class,
101  ['name' => 'table']
102  );
103 
104 // Include new content elements to modWizards
105 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig(
106  "@import 'EXT:frontend/Configuration/TSconfig/Page/Mod/Wizards/NewContentElement.tsconfig'"
107 );
108 // Include FormEngine adjustments
109 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig(
110  "@import 'EXT:frontend/Configuration/TSconfig/Page/TCEFORM.tsconfig'"
111 );
‪TYPO3\CMS\Extbase\Annotation
Definition: IgnoreValidation.php:4
‪TYPO3
‪$GLOBALS
‪$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['adminpanel']['modules']
Definition: ext_localconf.php:5