[~CONF] Extbase (Configuration): The configuration is now stored in ext_typoscript_se...
authorJochen Rau <j.rau@web.de>
Tue, 21 Jul 2009 15:47:30 +0000 (15:47 +0000)
committerJochen Rau <j.rau@web.de>
Tue, 21 Jul 2009 15:47:30 +0000 (15:47 +0000)
typo3/sysext/extbase/Classes/Configuration/Manager.php
typo3/sysext/extbase/Configuration/Settings/setup.txt [deleted file]
typo3/sysext/extbase/ext_tables.php [deleted file]
typo3/sysext/extbase/ext_typoscript_setup.txt [new file with mode: 0644]

index c5e5d71..d9e54ec 100644 (file)
@@ -98,11 +98,16 @@ class Tx_Extbase_Configuration_Manager {
         */
        public function loadExtbaseSettings($configuration, $cObj) {
                $settings = array();
         */
        public function loadExtbaseSettings($configuration, $cObj) {
                $settings = array();
-               $configurationSource = t3lib_div::makeInstance('Tx_Extbase_Configuration_Source_TypoScriptSource');
                $settings['storagePid'] = $this->getDefaultStoragePageId($cObj);
                $settings['storagePid'] = $this->getDefaultStoragePageId($cObj);
-               $settings = t3lib_div::array_merge_recursive_overrule($settings, $configurationSource->load('Extbase'));
-               $settings = t3lib_div::array_merge_recursive_overrule($settings, self::postProcessSettings($configuration));
                $settings['contentObjectData'] = $cObj->data;
                $settings['contentObjectData'] = $cObj->data;
+               $extbaseConfiguration = $GLOBALS['TSFE']->tmpl->setup['config.']['tx_extbase.'];
+               if (is_array($extbaseConfiguration)) {
+                       $extbaseConfiguration = Tx_Extbase_Configuration_Manager::postProcessSettings($extbaseConfiguration);
+               } else {
+                       $extbaseConfiguration = array();
+               }
+               $settings = t3lib_div::array_merge_recursive_overrule($settings, $extbaseConfiguration);
+               $settings = t3lib_div::array_merge_recursive_overrule($settings, self::postProcessSettings($configuration));
                
                $this->settings['Extbase'] = $settings;
        }
                
                $this->settings['Extbase'] = $settings;
        }
diff --git a/typo3/sysext/extbase/Configuration/Settings/setup.txt b/typo3/sysext/extbase/Configuration/Settings/setup.txt
deleted file mode 100644 (file)
index b856ee9..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-plugin.tx_extbase {
-       classes {
-               Tx_Extbase_Domain_Model_FrontendUser {
-                       mapping {
-                               tableName = fe_users
-                               columns {
-                                       lockToDomain.mapOnProperty = lockToDomain
-                               }
-                       }
-               }
-               Tx_Extbase_Domain_Model_FrontendUserGroup {
-                       mapping {
-                               tableName = fe_users
-                               columns {
-                                       lockToDomain.mapOnProperty = lockToDomain
-                               }
-                       }
-               }
-       }
-}
\ No newline at end of file
diff --git a/typo3/sysext/extbase/ext_tables.php b/typo3/sysext/extbase/ext_tables.php
deleted file mode 100644 (file)
index 4a0498e..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-<?php
-if (!defined ('TYPO3_MODE')) die ('Access denied.');
-
-// TODO This is only a preliminary solution
-t3lib_extMgm::addStaticFile($_EXTKEY, 'Configuration/Settings', 'Setup');
-
-?>
\ No newline at end of file
diff --git a/typo3/sysext/extbase/ext_typoscript_setup.txt b/typo3/sysext/extbase/ext_typoscript_setup.txt
new file mode 100644 (file)
index 0000000..c7bdf0a
--- /dev/null
@@ -0,0 +1,28 @@
+config.tx_extbase {
+       interfaces {
+               Tx_Extbase_Persistence_Storage_Backend {
+                       implementations {
+                               1.className = Tx_Extbase_Persistence_Storage_Typo3DbBackend
+                               2.className = Tx_Extbase_PErsistence_Storage_PdoBackend
+                       }
+               }
+       }
+       classes {
+               Tx_Extbase_Domain_Model_FrontendUser {
+                       mapping {
+                               tableName = fe_users
+                               columns {
+                                       lockToDomain.mapOnProperty = lockToDomain
+                               }
+                       }
+               }
+               Tx_Extbase_Domain_Model_FrontendUserGroup {
+                       mapping {
+                               tableName = fe_users
+                               columns {
+                                       lockToDomain.mapOnProperty = lockToDomain
+                               }
+                       }
+               }
+       }
+}
\ No newline at end of file