forked from Digi92/dw_content_elements
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathext_localconf.php
More file actions
executable file
·50 lines (45 loc) · 2.1 KB
/
ext_localconf.php
File metadata and controls
executable file
·50 lines (45 loc) · 2.1 KB
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
<?php
if (!defined('TYPO3_MODE')) {
die('Access denied.');
}
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/class.tx_cms_layout.php']['tt_content_drawItem'][$_EXTKEY] =
'Denkwerk\\DwContentElements\\Hooks\\PageLayoutViewDrawItemHook';
$configuration = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['dw_content_elements']);
$configurations = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['dw_content_elements'];
$providers = array();
if (isset($configurations['provider']) && count($configurations['provider'])) {
foreach ($configurations['provider'] as $extKey => $config) {
if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded($extKey) && is_array($config)) {
$providers[$extKey] = $config;
}
}
} elseif (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('dw_content_elements_source')) {
$providers['dw_content_elements_source'] = array(
'pluginName' => 'ContentRenderer',
'controllerActions' => array('Elements' => 'render'),
'namespace' => 'Denkwerk.' . $_EXTKEY. 'Source'
);
}
if (count($providers) > 0) {
foreach ($providers as $provider => $providerConfig) {
\TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin(
// unique plugin name
$providerConfig['namespace'],
$providerConfig['pluginName'],
// accessible controller-action-combinations
$providerConfig['controllerActions'],
// non-cachable controller-action-combinations (they must already be enabled)
array()
);
}
}
/**
* Only a hotfix for the bug: Missing rendering configuration for the content elements
* Die Rendering Definition sollte unter $GLOBALS['TSFE']->tmpl->setup['tt_content.'] stehen.
* Es kann unter nicht geklärten bedingungen vorkommen das diese Konfiguration nicht im Cache ist oder geladen wird
*
* @ToDo: Remove Hotfix or refactor
*/
$GLOBALS['TYPO3_CONF_VARS']['SYS']['Objects']['TYPO3\\CMS\\Frontend\\ContentObject\\CaseContentObject'] = array(
'className' => 'Denkwerk\\DwContentElements\\Xclass\\CaseContentObject',
);