[+TASK] Extbase (DomainModel): Extbase now adds a field "tx_extbase_type" to "fe_user...
authorJochen Rau <j.rau@web.de>
Fri, 16 Apr 2010 13:20:42 +0000 (13:20 +0000)
committerJochen Rau <j.rau@web.de>
Fri, 16 Apr 2010 13:20:42 +0000 (13:20 +0000)
typo3/sysext/extbase/Resources/Private/.htaccess [new file with mode: 0644]
typo3/sysext/extbase/Resources/Private/Language/locallang_db.xml [new file with mode: 0644]
typo3/sysext/extbase/ext_emconf.php
typo3/sysext/extbase/ext_tables.php
typo3/sysext/extbase/ext_tables.sql

diff --git a/typo3/sysext/extbase/Resources/Private/.htaccess b/typo3/sysext/extbase/Resources/Private/.htaccess
new file mode 100644 (file)
index 0000000..2e8cdb8
--- /dev/null
@@ -0,0 +1 @@
+deny  from all
diff --git a/typo3/sysext/extbase/Resources/Private/Language/locallang_db.xml b/typo3/sysext/extbase/Resources/Private/Language/locallang_db.xml
new file mode 100644 (file)
index 0000000..a93cff2
--- /dev/null
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<T3locallang>
+       <meta type="array">
+               <type>database</type>
+       </meta>
+       <data type="array">
+               <languageKey index="default" type="array">
+                       <label index="fe_users.tx_extbase_type">Record Type</label>
+                       <label index="fe_users.tx_extbase_type.0">undefined</label>
+                       <label index="fe_users.tx_extbase_type.Tx_Extbase_Domain_Model_FrontendUser">Tx_Extbase_Domain_Model_FrontendUser</label>
+                       <label index="fe_groups.tx_extbase_type">Record Type</label>
+                       <label index="fe_groups.tx_extbase_type.0">undefined</label>
+                       <label index="fe_groups.tx_extbase_type.Tx_Extbase_Domain_Model_FrontendUserGroup">Tx_Extbase_Domain_Model_FrontendUserGroup</label>
+               </languageKey>
+       </data>
+</T3locallang>
\ No newline at end of file
index c1a7f16..6291869 100644 (file)
@@ -26,7 +26,7 @@ $EM_CONF[$_EXTKEY] = array(
        'uploadfolder' => 0,
        'createDirs' => '',
        'modify_tables' => '',
-       'clearCacheOnLoad' => 0,
+       'clearCacheOnLoad' => 1,
        'lockType' => '',
        'author_company' => 'TYPO3 core team',
        'version' => '1.1.0beta1',
index 37aadab..5a25614 100644 (file)
@@ -18,8 +18,53 @@ if (TYPO3_MODE == 'BE') {
        }
 
        $TBE_MODULES['_dispatcher'][] = 'Tx_Extbase_Dispatcher';
-
-       $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['reports']['tx_reports']['status']['providers']['extbase'][] = 'tx_extbase_utility_extbaserequirementscheck';
+       
 }
 
+$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['reports']['tx_reports']['status']['providers']['extbase'][] = 'tx_extbase_utility_extbaserequirementscheck';
+
+$tempColumns = array(
+       'tx_extbase_type' => array(
+               'exclude' => 1,
+               'label'   => 'LLL:EXT:extbase/Resources/Private/Language/locallang_db.xml:fe_users.tx_extbase_type',
+               'config' => array(
+                       'type' => 'select',
+                       'items' => array(
+                               array('LLL:EXT:extbase/Resources/Private/Language/locallang_db.xml:fe_users.tx_extbase_type.0', '0'),
+                               array('LLL:EXT:extbase/Resources/Private/Language/locallang_db.xml:fe_users.tx_extbase_type.Tx_Extbase_Domain_Model_FrontendUser', 'Tx_Extbase_Domain_Model_FrontendUser')
+                       ),
+                       'size' => 1,
+                       'maxitems' => 1,
+                       'default' => '0'
+               )
+       )
+);
+t3lib_div::loadTCA('fe_users');
+t3lib_extMgm::addTCAcolumns('fe_users', $tempColumns, 1);
+t3lib_extMgm::addToAllTCAtypes('fe_users', 'tx_extbase_type');
+$TCA['fe_users']['ctrl']['type'] = 'tx_extbase_type'; // TODO handle already set 'type'
+$TCA['fe_users']['types']['Tx_Extbase_Domain_Model_FrontendUser'] = $TCA['fe_users']['types']['0'];
+
+$tempColumns = array(
+       'tx_extbase_type' => array(
+               'exclude' => 1,
+               'label'   => 'LLL:EXT:extbase/Resources/Private/Language/locallang_db.xml:fe_groups.tx_extbase_type',
+               'config' => array(
+                       'type' => 'select',
+                       'items' => array(
+                               array('LLL:EXT:extbase/Resources/Private/Language/locallang_db.xml:fe_groups.tx_extbase_type.0', '0'),
+                               array('LLL:EXT:extbase/Resources/Private/Language/locallang_db.xml:fe_groups.tx_extbase_type.Tx_Extbase_Domain_Model_FrontendUserGroup', 'Tx_Extbase_Domain_Model_FrontendUserGroup')
+                       ),
+                       'size' => 1,
+                       'maxitems' => 1,
+                       'default' => '0'
+               )
+       )
+);
+t3lib_div::loadTCA('fe_groups');
+t3lib_extMgm::addTCAcolumns('fe_groups', $tempColumns, 1);
+t3lib_extMgm::addToAllTCAtypes('fe_groups', 'tx_extbase_type');
+$TCA['fe_groups']['ctrl']['type'] = 'tx_extbase_type'; // TODO handle already set 'type'
+$TCA['fe_groups']['types']['Tx_Extbase_Domain_Model_FrontendUserGroup'] = $TCA['fe_groups']['types']['0'];
+
 ?>
\ No newline at end of file
index 5c0e326..9f10cfc 100644 (file)
@@ -23,4 +23,12 @@ CREATE TABLE tx_extbase_cache_reflection_tags (
   PRIMARY KEY (id),
   KEY cache_id (identifier),
   KEY cache_tag (tag)
-) ENGINE=InnoDB;
\ No newline at end of file
+) ENGINE=InnoDB;
+
+CREATE TABLE fe_users (
+       tx_extbase_type varchar(255)
+);
+
+CREATE TABLE fe_groups (
+       tx_extbase_type varchar(255)
+);
\ No newline at end of file