[!!!][TASK] Remove CSC TypoScript for 6.2
[Packages/TYPO3.CMS.git] / typo3 / sysext / css_styled_content / ext_localconf.php
1 <?php
2 defined('TYPO3_MODE') or die();
3
4 // Disable image positions that make no sense on CType=image (it leaves just "above left", "center" and "right")
5 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig('
6 TCEFORM.tt_content.imageorient.types.image.removeItems = 8,9,10,17,18,25,26
7 ');
8
9 // Mark the delivered TypoScript templates as "content rendering template"
10 $GLOBALS['TYPO3_CONF_VARS']['FE']['contentRenderingTemplates'][] = 'cssstyledcontent/static/';
11 $GLOBALS['TYPO3_CONF_VARS']['FE']['contentRenderingTemplates'][] = 'cssstyledcontent/Configuration/TypoScript/v7/';
12
13 // Register for hook to show preview of tt_content element of CType="image" in page module
14 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/class.tx_cms_layout.php']['tt_content_drawItem']['image'] =
15 \TYPO3\CMS\CssStyledContent\Hooks\PageLayoutView\ImagePreviewRenderer::class;
16
17 // Register for hook to show preview of tt_content element of CType="textpic" in page module
18 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/class.tx_cms_layout.php']['tt_content_drawItem']['textpic'] =
19 \TYPO3\CMS\CssStyledContent\Hooks\PageLayoutView\TextpicPreviewRenderer::class;
20
21 // Register for hook to show preview of tt_content element of CType="text" in page module
22 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/class.tx_cms_layout.php']['tt_content_drawItem']['text'] =
23 \TYPO3\CMS\CssStyledContent\Hooks\PageLayoutView\TextPreviewRenderer::class;
24
25 if (TYPO3_MODE === 'BE') {
26 call_user_func(
27 function ($extKey) {
28 // Get the extension configuration
29 $extConf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf'][$extKey]);
30
31 if (!isset($extConf['loadContentElementWizardTsConfig']) || (int)$extConf['loadContentElementWizardTsConfig'] === 1) {
32 // Include new content elements to modWizards
33 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig('<INCLUDE_TYPOSCRIPT: source="FILE:EXT:css_styled_content/Configuration/PageTSconfig/NewContentElementWizard.ts">');
34 }
35
36 $dispatcher = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\SignalSlot\Dispatcher::class);
37 $dispatcher->connect(
38 \TYPO3\CMS\Extensionmanager\Controller\ConfigurationController::class,
39 'afterExtensionConfigurationWrite',
40 \TYPO3\CMS\CssStyledContent\Hooks\TcaCacheClearing::class,
41 'clearTcaCache'
42 );
43 },
44 $_EXTKEY
45 );
46 }