[TASK] Re-work/simplify copyright header in PHP files - Part 5
[Packages/TYPO3.CMS.git] / typo3 / sysext / felogin / ext_tables.php
index 10962b4..ad2fced 100644 (file)
@@ -1,26 +1,31 @@
 <?php
-if (!defined ('TYPO3_MODE'))   die ('Access denied.');
+if (!defined('TYPO3_MODE')) {
+       die('Access denied.');
+}
 $_EXTCONF = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['felogin']);
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue('*', 'FILE:EXT:' . $_EXTKEY . '/flexform.xml', 'login');
 
-t3lib_div::loadTCA('tt_content');
-
-if(t3lib_div::int_from_ver(TYPO3_version) >= 4002000)
-       t3lib_extMgm::addPiFlexFormValue('*','FILE:EXT:'.$_EXTKEY.'/flexform.xml','login');
-else
-       t3lib_extMgm::addPiFlexFormValue('default','FILE:EXT:'.$_EXTKEY.'/flexform.xml');
-
-
-
-       #replace login
-$TCA['tt_content']['types']['login']['showitem']='CType;;4;;1-1-1, hidden, header;;3;;2-2-2, linkToTop;;;;3-3-3,
-                                                       --div--;LLL:EXT:cms/locallang_ttc.xml:CType.I.14, pi_flexform;;;;1-1-1,
-                                                       --div--;LLL:EXT:cms/locallang_tca.xml:pages.tabs.access, starttime, endtime';
-
-       // Adds the redirect field to the fe_groups table
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTcaSelectItem('tt_content', 'CType', array(
+       'LLL:EXT:cms/locallang_ttc.xlf:CType.I.10',
+       'login',
+       'i/tt_content_login.gif'
+), 'mailform', 'after');
+$GLOBALS['TCA']['tt_content']['types']['login']['showitem'] = '--palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.general;general,
+                                                                                                       --palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.header;header,
+                                                                                                       --div--;LLL:EXT:cms/locallang_ttc.xlf:tabs.plugin,
+                                                                                                       pi_flexform;;;;1-1-1,
+                                                                                                       --div--;LLL:EXT:cms/locallang_ttc.xlf:tabs.access,
+                                                                                                       --palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.visibility;visibility,
+                                                                                                       --palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.access;access,
+                                                                                                       --div--;LLL:EXT:cms/locallang_ttc.xlf:tabs.appearance,
+                                                                                                       --palette--;LLL:EXT:cms/locallang_ttc.xlf:palette.frames;frames,
+                                                                                                       --div--;LLL:EXT:cms/locallang_ttc.xlf:tabs.behaviour,
+                                                                                                       --div--;LLL:EXT:cms/locallang_ttc.xlf:tabs.extended';
+// Adds the redirect field to the fe_groups table
 $tempColumns = array(
        'felogin_redirectPid' => array(
                'exclude' => 1,
-               'label'  => 'LLL:EXT:felogin/locallang_db.xml:felogin_redirectPid',
+               'label' => 'LLL:EXT:felogin/locallang_db.xlf:felogin_redirectPid',
                'config' => array(
                        'type' => 'group',
                        'internal_type' => 'db',
@@ -28,39 +33,42 @@ $tempColumns = array(
                        'size' => 1,
                        'minitems' => 0,
                        'maxitems' => 1,
+                       'wizards' => array(
+                               'suggest' => array(
+                                       'type' => 'suggest'
+                               )
+                       )
                )
-       ),
+       )
 );
-
-t3lib_div::loadTCA('fe_groups');
-t3lib_extMgm::addTCAcolumns('fe_groups', $tempColumns, 1);
-t3lib_extMgm::addToAllTCAtypes('fe_groups', 'felogin_redirectPid;;;;1-1-1');
-
-       // Adds the redirect field and the forgotHash field to the fe_users-table
-$tempColumns = array (
-       "felogin_redirectPid" => array (
-               "exclude" => 1,
-               "label" => "LLL:EXT:felogin/locallang_db.xml:felogin_redirectPid",
-               "config" => array (
-                       "type" => "group",
-                       "internal_type" => "db",
-                       "allowed" => "pages",
-                       "size" => 1,
-                       "minitems" => 0,
-                       "maxitems" => 1,
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('fe_groups', $tempColumns);
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes('fe_groups', 'felogin_redirectPid;;;;1-1-1', '', 'after:TSconfig');
+// Adds the redirect field and the forgotHash field to the fe_users-table
+$tempColumns = array(
+       'felogin_redirectPid' => array(
+               'exclude' => 1,
+               'label' => 'LLL:EXT:felogin/locallang_db.xlf:felogin_redirectPid',
+               'config' => array(
+                       'type' => 'group',
+                       'internal_type' => 'db',
+                       'allowed' => 'pages',
+                       'size' => 1,
+                       'minitems' => 0,
+                       'maxitems' => 1,
+                       'wizards' => array(
+                               'suggest' => array(
+                                       'type' => 'suggest'
+                               )
+                       )
                )
        ),
-       'felogin_forgotHash' => array (
+       'felogin_forgotHash' => array(
                'exclude' => 1,
-               'label' => 'LLL:EXT:felogin/locallang_db.xml:felogin_forgotHash',
-               'config' => array (
-                       'type' => 'passthrough',
+               'label' => 'LLL:EXT:felogin/locallang_db.xlf:felogin_forgotHash',
+               'config' => array(
+                       'type' => 'passthrough'
                )
-       ),
+       )
 );
-
-t3lib_div::loadTCA("fe_users");
-t3lib_extMgm::addTCAcolumns("fe_users",$tempColumns,1);
-t3lib_extMgm::addToAllTCAtypes("fe_users","felogin_redirectPid;;;;1-1-1");
-
-?>
\ No newline at end of file
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('fe_users', $tempColumns);
+\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addToAllTCAtypes('fe_users', 'felogin_redirectPid;;;;1-1-1', '', 'after:TSconfig');