Revert "[TASK] Remove loadTCA calls"
authorChristian Kuhn <lolli@schwarzbu.ch>
Wed, 13 Feb 2013 16:05:05 +0000 (17:05 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Wed, 13 Feb 2013 16:06:23 +0000 (17:06 +0100)
This reverts commit c2464e992668a0afbb8d8aa663324cec47275b94

Change-Id: I6bedfd6f4279c70d8d77dee6cd4cea5edab8828b
Related: #45107
Reviewed-on: https://review.typo3.org/18245
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
typo3/sysext/extbase/Classes/Persistence/Generic/Mapper/DataMapFactory.php
typo3/sysext/extbase/ext_tables.php

index d954dad..3df8803 100644 (file)
@@ -230,6 +230,7 @@ class DataMapFactory implements \TYPO3\CMS\Core\SingletonInterface {
         * @return array The TCA columns definition
         */
        protected function getControlSection($tableName) {
+               $this->includeTca($tableName);
                return is_array($GLOBALS['TCA'][$tableName]['ctrl']) ? $GLOBALS['TCA'][$tableName]['ctrl'] : NULL;
        }
 
@@ -240,10 +241,24 @@ class DataMapFactory implements \TYPO3\CMS\Core\SingletonInterface {
         * @return array The TCA columns definition
         */
        protected function getColumnsDefinition($tableName) {
+               $this->includeTca($tableName);
                return is_array($GLOBALS['TCA'][$tableName]['columns']) ? $GLOBALS['TCA'][$tableName]['columns'] : array();
        }
 
        /**
+        * Includes the TCA for the given table
+        *
+        * @param string $tableName An optional table name to fetch the columns definition from
+        * @return void
+        */
+       protected function includeTca($tableName) {
+               if (TYPO3_MODE === 'FE') {
+                       $GLOBALS['TSFE']->includeTCA();
+               }
+               \TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA($tableName);
+       }
+
+       /**
         * @param DataMap $dataMap
         * @param $tableName
         * @return DataMap
index 667e602..529bae9 100644 (file)
@@ -7,6 +7,7 @@ if (TYPO3_MODE == 'BE') {
        $TBE_MODULES['_dispatcher'][] = 'TYPO3\\CMS\\Extbase\\Core\\ModuleRunnerInterface';
 }
 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['reports']['tx_reports']['status']['providers']['extbase'][] = 'TYPO3\\CMS\\Extbase\\Utility\\ExtbaseRequirementsCheckUtility';
+\TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA('fe_users');
 if (!isset($TCA['fe_users']['ctrl']['type'])) {
        $tempColumns = array(
                'tx_extbase_type' => array(
@@ -29,6 +30,7 @@ if (!isset($TCA['fe_users']['ctrl']['type'])) {
        $TCA['fe_users']['ctrl']['type'] = 'tx_extbase_type';
 }
 $TCA['fe_users']['types']['Tx_Extbase_Domain_Model_FrontendUser'] = $TCA['fe_users']['types']['0'];
+\TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA('fe_groups');
 if (!isset($TCA['fe_groups']['ctrl']['type'])) {
        $tempColumns = array(
                'tx_extbase_type' => array(