Skip to content
This repository has been archived by the owner on Jan 11, 2023. It is now read-only.

Commit

Permalink
[CHG] use new 6.2 tca structure
Browse files Browse the repository at this point in the history
  • Loading branch information
kabarakh committed Dec 5, 2014
1 parent 6ef66d6 commit 511173c
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 48 deletions.
12 changes: 12 additions & 0 deletions Configuration/TCA/Overrides/pages.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php
defined('TYPO3_MODE') or die();

$pageSortingColumn = array(
'sorting' => array (
'config' => array (
'type' => 'passthrough',
)
)
);

\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTCAcolumns('pages',$pageSortingColumn);
Original file line number Diff line number Diff line change
@@ -1,10 +1,21 @@
<?php
if (!defined ('TYPO3_MODE')) {
die ('Access denied.');
}

$TCA['tx_ptextbase_tree_node'] = array(
'ctrl' => $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',
),
Expand Down Expand Up @@ -108,6 +119,3 @@
),
)
);

$TCA['tx_ptextbase_tree_node']['ctrl']['hideTable'] = 1;
?>
42 changes: 3 additions & 39 deletions ext_tables.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}

0 comments on commit 511173c

Please sign in to comment.