[+FEATURE] Backport CommandController Implementation
[Packages/TYPO3.CMS.git] / typo3 / sysext / extbase / ext_localconf.php
1 <?php
2 if (!defined ('TYPO3_MODE')) die ('Access denied.');
3
4 require_once(t3lib_extMgm::extPath('extbase') . 'Classes/Dispatcher.php');
5 require_once(t3lib_extMgm::extPath('extbase') . 'Classes/Utility/Extension.php');
6
7 // Register caches if not already done in localconf.php or a previously loaded extension.
8 // We do not set frontend and backend: The cache manager uses t3lib_cache_frontend_VariableFrontend
9 // and t3lib_cache_backend_DbBackend by default if not set otherwise.
10 // This default is perfectly fine for our reflection and object cache.
11 if (!is_array($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['extbase_reflection'])) {
12 $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['extbase_reflection'] = array();
13 }
14 if (!is_array($GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['extbase_object'])) {
15 $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations']['extbase_object'] = array();
16 }
17
18 // We need to set the default implementation for Storage Backend & Query Settings
19 // the code below is NO PUBLIC API! It's just to make sure that
20 // Extbase works correctly in the backend if the page tree is empty or no
21 // template is defined.
22 $extbaseObjectContainer = t3lib_div::makeInstance('Tx_Extbase_Object_Container_Container'); // Singleton
23 $extbaseObjectContainer->registerImplementation('Tx_Extbase_Persistence_Storage_BackendInterface', 'Tx_Extbase_Persistence_Storage_Typo3DbBackend');
24 $extbaseObjectContainer->registerImplementation('Tx_Extbase_Persistence_QuerySettingsInterface', 'Tx_Extbase_Persistence_Typo3QuerySettings');
25 unset($extbaseObjectContainer);
26
27 // Register type converters
28 Tx_Extbase_Utility_Extension::registerTypeConverter('Tx_Extbase_Property_TypeConverter_ArrayConverter');
29 Tx_Extbase_Utility_Extension::registerTypeConverter('Tx_Extbase_Property_TypeConverter_BooleanConverter');
30 Tx_Extbase_Utility_Extension::registerTypeConverter('Tx_Extbase_Property_TypeConverter_DateTimeConverter');
31 Tx_Extbase_Utility_Extension::registerTypeConverter('Tx_Extbase_Property_TypeConverter_FloatConverter');
32 Tx_Extbase_Utility_Extension::registerTypeConverter('Tx_Extbase_Property_TypeConverter_IntegerConverter');
33 Tx_Extbase_Utility_Extension::registerTypeConverter('Tx_Extbase_Property_TypeConverter_ObjectStorageConverter');
34 Tx_Extbase_Utility_Extension::registerTypeConverter('Tx_Extbase_Property_TypeConverter_PersistentObjectConverter');
35 Tx_Extbase_Utility_Extension::registerTypeConverter('Tx_Extbase_Property_TypeConverter_StringConverter');
36 # $GLOBALS ['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass'][] = 'EXT:extbase/Classes/Persistence/Hook/TCEMainValueObjectUpdater.php:tx_Extbase_Persistence_Hook_TCEMainValueObjectUpdater';
37
38 if (TYPO3_MODE === 'BE') {
39 // registers Extbase at the cli_dispatcher with key "extbase".
40 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['GLOBAL']['cliKeys']['extbase'] = array(
41 'EXT:extbase/Scripts/CommandLineLauncher.php',
42 '_CLI_lowlevel'
43 );
44 // register help command
45 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['extbase']['commandControllers'][] = 'Tx_Extbase_Command_HelpCommandController';
46 }
47 ?>