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