[TYPO3-dev] TCA-definition in Configuration/TCA/Overrides not working
Jost Baron
jost.baron at gmx.de
Fri Jun 6 21:44:08 CEST 2014
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
I'm trying to extend the fe_users table, with the TCA definition
below. I tried to make use of the new TCA-Caching feature by placing
this into the file $Extkey/Configuration/TCA/Overrides/fe_users.php.
If I do that, it seems that my changes are later overwritten by
extbases ext_tables.php. If I put this code into my ext_tables.php,
everything works fine.
Is this a bug, or am I doing something wrong?
Regards,
Jost
TCA definition (with syntax highlighting: http://pastebin.com/vndjCwYU):
$newColumns = array(
'ratings' => array(
'label' => $lll . 'somelabel',
'config' => array(
'readOnly' => '1',
'type' => 'select',
'foreign_table' => 'mytable',
'foreign_field' => 'somefield',
'maxitems' => '1000000',
'minitems' => '0',
'autoSizeMax' => '20',
),
),
);
ExtensionManagementUtility::addTCAcolumns('fe_users', $newColumns);
// Add types to the TCA
$recordType = 'MyRecordType';
$GLOBALS['TCA']['fe_users']['types'][$recordType] =
$GLOBALS['TCA']['fe_users']['types']['0'];
$GLOBALS['TCA']['fe_users']['columns']['tx_extbase_type']['config']['items'][]
= array(
$lll . 'anotherlabel',
$recordType
);
ExtensionManagementUtility::addToAllTCAtypes('fe_users', 'ratings',
$recordType, 'after:tx_extbase_type');
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iEYEARECAAYFAlOSGf4ACgkQNme/yCvmvTLhHwCgxNtcHxSclKq6+z3hmo5MnUFd
9sEAn1il9/Jy1YM6zy5hpiMvh4z4YzE3
=lF6h
-----END PGP SIGNATURE-----
More information about the TYPO3-dev
mailing list