From 511173cfdb61a768f0dde3049c274e1a664cdc32 Mon Sep 17 00:00:00 2001 From: Christian Herberger Date: Fri, 5 Dec 2014 10:16:22 +0100 Subject: [PATCH] [CHG] use new 6.2 tca structure --- Configuration/TCA/Overrides/pages.php | 12 ++++++ .../{Node.php => tx_ptextbase_tree_node.php} | 26 ++++++++---- ext_tables.php | 42 ++----------------- 3 files changed, 32 insertions(+), 48 deletions(-) create mode 100644 Configuration/TCA/Overrides/pages.php rename Configuration/TCA/{Node.php => tx_ptextbase_tree_node.php} (84%) diff --git a/Configuration/TCA/Overrides/pages.php b/Configuration/TCA/Overrides/pages.php new file mode 100644 index 00000000..bd480c1a --- /dev/null +++ b/Configuration/TCA/Overrides/pages.php @@ -0,0 +1,12 @@ + array ( + 'config' => array ( + 'type' => 'passthrough', + ) + ) +); + +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('pages',$pageSortingColumn); \ No newline at end of file diff --git a/Configuration/TCA/Node.php b/Configuration/TCA/tx_ptextbase_tree_node.php similarity index 84% rename from Configuration/TCA/Node.php rename to Configuration/TCA/tx_ptextbase_tree_node.php index a00278d6..80c6fe9c 100644 --- a/Configuration/TCA/Node.php +++ b/Configuration/TCA/tx_ptextbase_tree_node.php @@ -1,10 +1,21 @@ $TCA['tx_ptextbase_tree_node']['ctrl'], +return array( + 'ctrl' => array ( + 'title' => 'TreeNode', + 'label' => 'label', + 'tstamp' => 'tstamp', + 'crdate' => 'crdate', + 'origUid' => 't3_origuid', + 'languageField' => 'sys_language_uid', + 'transOrigPointerField' => 'l18n_parent', + 'transOrigDiffSourceField' => 'l18n_diffsource', + 'delete' => 'deleted', + 'enablecolumns' => array( + 'disabled' => 'hidden' + ), + 'iconfile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath('pt_extbase') . 'Resources/Public/Icons/icon_tx_ptextbase_tree_node.png', + 'hideTable' => 1 + ), 'interface' => array( 'showRecordFieldList' => 'label', ), @@ -108,6 +119,3 @@ ), ) ); - -$TCA['tx_ptextbase_tree_node']['ctrl']['hideTable'] = 1; -?> \ No newline at end of file diff --git a/ext_tables.php b/ext_tables.php index 0c9db2ce..6c8f1352 100644 --- a/ext_tables.php +++ b/ext_tables.php @@ -3,48 +3,12 @@ -t3lib_extMgm::addStaticFile($_EXTKEY, 'Configuration/TypoScript', '[pt_extbase] Tools for Extbase development'); +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile($_EXTKEY, 'Configuration/TypoScript', '[pt_extbase] Tools for Extbase development'); -t3lib_extMgm::allowTableOnStandardPages('tx_ptextbase_tree_node'); -$TCA['tx_ptextbase_tree_node'] = array ( - 'ctrl' => array ( - 'title' => 'TreeNode', - 'label' => 'label', - 'tstamp' => 'tstamp', - 'crdate' => 'crdate', - 'origUid' => 't3_origuid', - 'languageField' => 'sys_language_uid', - 'transOrigPointerField' => 'l18n_parent', - 'transOrigDiffSourceField' => 'l18n_diffsource', - 'delete' => 'deleted', - 'enablecolumns' => array( - 'disabled' => 'hidden' - ), - 'dynamicConfigFile' => t3lib_extMgm::extPath($_EXTKEY) . 'Configuration/TCA/Node.php', - 'iconfile' => t3lib_extMgm::extRelPath($_EXTKEY) . 'Resources/Public/Icons/icon_tx_ptextbase_tree_node.png' - ) -); - +\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::allowTableOnStandardPages('tx_ptextbase_tree_node'); // Custom CSS include if (TYPO3_MODE=="BE") { $TBE_STYLES['inDocStyles_TBEstyle'] .= '@import "/typo3conf/ext/pt_extbase/Resources/Public/CSS/Backend.css";'; -} - -$pageSortingColumn = array( - 'sorting' => array ( - 'exclude' => 0, - 'label' => 'Sorting', - 'config' => array ( - 'type' => 'input', - 'size' => 8, - 'eval' => 'int,required,trim', - 'readOnly' => TRUE - ) - ) -); - -t3lib_div::loadTCA('pages'); -t3lib_extMgm::addTCAcolumns('pages',$pageSortingColumn,1); -//t3lib_extMgm::addToAllTCAtypes('pages','sorting','', 'after:module'); \ No newline at end of file +} \ No newline at end of file